Page 1 of 3
What programing language are you using? and why?
Posted: Wed Aug 17, 2011 3:58 pm
by melgmry0101b
Hi everyone,
What programing language are you using? and why?
I am using C++ with Microsoft Visual C++.
I am using it because it is easy to find errors and many documents and tutorials usually use C or C++.
Also MSVC is a good tool in collecting errors , showing you where is the error , modifying the projects' properties easily and it is fast in compiling.
MSVC gives the C++ code files a good formatting and coloring that helps the programmer to dive in the code easily
-Edit : This discussion is about OS development and it may help beginners to choose the right language for the right purpose.
Re: What programing language are you using? and why?
Posted: Wed Aug 17, 2011 4:20 pm
by mark3094
I'm using a combination of C and assembly.
I'm using MS VC++ 2010 Express, with NASM for the asm files.
I agree that C (or C++) is good because of the amount of tutorials written in it.
It is also quite powerful, and stil easy(ish) to understand.
Also, other OS's (eg, Linux and many more) have large amounts written in C, which I think is a good testamonial
Re: What programing language are you using? and why?
Posted: Wed Aug 17, 2011 8:01 pm
by xvedejas
Despite being a fan of OOP, I use C (gcc) and asm (FASM) because I believe when designing a kernel, these allow for the fewest moving parts to worry about when coding.
Re: What programing language are you using? and why?
Posted: Wed Aug 17, 2011 8:04 pm
by torshie
C++/eclipse cdt/gcc 4.6
I'm also planning to try some C++0x features in the near future
Re: What programing language are you using? and why?
Posted: Wed Aug 17, 2011 8:18 pm
by Yargh
Personally, I use C++ and assembly. They're just much easier (to do OS programming in) than other languages.
Also, on the topic of compilers, I use GCC. (GAS for assembly, but I use intel syntax, due to it being easier to use/read than AT&T).
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 12:41 am
by Combuster
Basic, Assembly and C. Basic because it has all the required features, and still allows you to do some common tasks much easier than with stock C functions. Assembly because you can't do without, and C because I'm sensible enough not to rewrite existing code in Basic.
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 1:38 am
by Laksen
I use Object Pascal.
It compiles fast and easy, easy to port, and makes me feel good
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 1:56 am
by xenos
C++ and ASM, GCC and GAS, no IDE.
I prefer object oriented programming techniques which are easy to implement, mixed with a bit of ASM whenever this is necessary. GCC and GAS target all architectures I'm working with (x86 (32 / 64), ARM, M68K).
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 4:33 am
by maakera
C/Assembly
Because i have more experience with C.
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 4:45 am
by OSwhatever
Mozo40 wrote:Hi everyone,
What programing language are you using? and why?
I am using C++ with Microsoft Visual C++.
I am using it because it is easy to find errors and many documents and tutorials usually use C or C++.
Also MSVC is a good tool in collecting errors , showing you where is the error , modifying the projects' properties easily and it is fast in compiling.
MSVC gives the C++ code files a good formatting and coloring that helps the programmer to dive in the code easily
You forgot to mention for what purpose. Applications? OS development?
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 6:32 am
by melgmry0101b
OSwhatever wrote:Mozo40 wrote:Hi everyone,
What programing language are you using? and why?
I am using C++ with Microsoft Visual C++.
I am using it because it is easy to find errors and many documents and tutorials usually use C or C++.
Also MSVC is a good tool in collecting errors , showing you where is the error , modifying the projects' properties easily and it is fast in compiling.
MSVC gives the C++ code files a good formatting and coloring that helps the programmer to dive in the code easily
You forgot to mention for what purpose. Applications? OS development?
For OS development
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 8:53 am
by turdus
I use CL (this is my own programming language, that allows you to write and mix object oriented assembly and C) and fasm. I wrote the compiler in ANSI C, and I use gcc to compile it.
I did this because I really wanted to start from ground up (including the compiler, the ABI and the object/executable format). I choose fasm because it's fast, small, supports amd64 and incredibly easy to port. Nevertheless it has rich macro capabilities.
I'm pretty sure many of you wondering what's the source look like, here's an example:
Code: Select all
//tell the compiler that code blocks use fasm syntax
#codeblock "fasm"
import lib.stdio;
class app.helloworld{
int counter=0; //initialized class variable
//entry point and arguments, similar to C's
int main(string[] args)
{
.var string hello="Hello World!" //initialized variable in local stack frame
//some meaningless code in native assembly
xor rax, rax
//same as counter++
clbaseof rbx, app_helloworld.counter //rbx=&counter;
inc qword [rbx]
//say hello
clcall0 lib_stdio.printf, hello
//return a value
clret 0
}
}
- or -
import lib.stdio;
class app.helloworld {
int counter=0;
int main(){
string hello="Hello World!";
app.helloworld.counter++; //will not call object.int.inc(counter) because it's an inline method
lib.stdio.printf(hello);
return(0);
}
}
The compiler generates an intermediate assembly source file, that can be assembled with a macro assembler and the corresponding CL header file (that contains macros for machine independent mnemonics, like clbaseof or clret). Currently I have headers for fasm, nasm and gas.
CL has basic support for aspect paradigm, and supports operator overloading, dynamic linking, monitors (aka critical sections), randezvous points, class level polymorphism and multiple dispatch. It does not support (and never will) inheritance and virtual methods (you have virtual classes, you can't change one method in a class, only all methods at once if the old and new interface conforming).
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 9:15 am
by rootnode
I use C# for OS development with an own compiler (also written in C#) to produce an AOT'd kernel and later it's going to be used as a JIT compiler.
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 9:31 am
by OSwhatever
I'm using GCC C++ and assembly language on very places. Code::Blocks as editor.
rootnode wrote:I use C# for OS development with an own compiler (also written in C#) to produce an AOT'd kernel and later it's going to be used as a JIT compiler.
Interesting to see that managed languages are starting to become more and more used for OS development.
Re: What programing language are you using? and why?
Posted: Thu Aug 18, 2011 10:14 am
by IanSeyler
Assembly for the Operating System(s) I am building. C for the programs and WebUI that can control the OS. Assembly and/or C for the applications that run on the OS.