Join 132,367 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,290 people online right now. Registration is fast and FREE... Join Now!
Making your own language is a TON of work. While it is possible you either have to : a) build off of another language or create the language from scratch at which point you start at Assembly. NOTE - When starting from assembly you will have to choose a certain processor, graphics card, sound card, network card, etc. to work with and the language will NOT work the same on a different computers (one that has different cards than the one you programmed on).
C/C++ has already done all of this and made it work across the various OSs and cards (as it is the standard programming language at this time it is supported pretty much by everything). When you try to make a new language you have to start from blank. NOTHING will have been done to make this language work across OS or system specifications unless you do it.
Basics of creating a language: You need to come up with a lexar (lexical analysis), syntax, symantecs, a way to compile the language to byte code (or whatever you want to be able to run) and more (I have not personally done anything like this on my own, but at one time I was thinking about it).
So, in all, it is far easier to learn a language that already exists and works than it is to attempt to create one that will work on only a specific computer setup.
create the language from scratch at which point you start at Assembly. NOTE - When starting from assembly you will have to choose a certain processor, graphics card, sound card, network card, etc. to work with and the language will NOT work the same on a different computers (one that has different cards than the one you programmed on).
Nonsense.
First, the idea that designing a programming language has anything to do with video, sound, and network devices is just silly. No language actually does that. Handling those is the job of the operating system, not the programming language.
Second, there's no rule that a new programming language has to compile to machine code. Most new languages don't these days. They either run on an interpreter (e.g. Python and PHP) or compile down to an intermediate code that's just-in-time compiled by a virtual machine (e.g. Java and C#). Being conversant in assembly language may be helpful, but you certainly don't have to start there.
Of course, it doesn't matter that much. It sounds like the OP wants to design his own language because he's having trouble learning C++. That's like trying to build your own car because you can't figure out how to change a spark plug. If you're not able to get a handle on C++, you have less than no chance of being able to design and implement a new language.
First, the idea that designing a programming language has anything to do with video, sound, and network devices is just silly. No language actually does that. Handling those is the job of the operating system, not the programming language.
Ok, thanks for that clarification.
QUOTE
Second, there's no rule that a new programming language has to compile to machine code. Most new languages don't these days. They either run on an interpreter (e.g. Python and PHP) or compile down to an intermediate code that's just-in-time compiled by a virtual machine (e.g. Java and C#). Being conversant in assembly language may be helpful, but you certainly don't have to start there.
The point I was trying to make there was that you have to use a lower level language (one that has the ability to do things you are looking for), and, if you don't like C/C++ that limits the number of extremely powerfull languages you can use to make the new language.
Most people use the language that they are comfortable with.
If you find C# better, start with C# and move back to C++ when you feel more confident in programming.
As for creating your own language, you're going to have to have a solid knowledge of at least one language first~ This means that you'll understand the key concepts of programming before trying to make your own language. Look at it this way: You don't run before you can walk.
Quite a few people actually create their own languages, often when they're not happy with a language that they're currently developing in. Take Java, for example. The guy who wrote that was working on a C++ project, but didn't particularly like C++ so he made Java.
Most commonly, small programming languages written by individuals tend to be interpreted languages. In other words, it will be translated into a different language. Example, search Google for lolcode. People have written interpreters in all different languages. Come to think of it, I started writing one in C++ ages ago... what happened to that?
Oh well~
Point is, don't run before you can walk. Didn't I already say that? Can't remember.
I agree with Programmist. If you are having a hard time grasping a language, then developing one isn't the ideal way to proceed. While it is possible for someone to create a programming language, a full knowledge & understanding of computing, compiler design, & math must be understood. & for someone that is having a hard time finding C++ tutorials, well, to be honest, it's going to be very overwhelming.
It's as if though you were driving down the road & you've gotten a flat tire. But you can't find in the instruction manual how to change the tire, so you decide to redesign the car.
ok yes you would have to start at Assembly, but if you start at assembly yes it will have to be configured by the system you started it on and while you could configure it to work on other systems originally it will only work on the one u designed it. and as for the operating system doing all the work with the processor and graphics card ect...no the system recognizes these things before the operating system does and while drivers to run the items properly may be operating system required, the fact that the system recognizes the parts does come into play. but yes it would be alot of work. just stick with C. or if you are just wanting to make small applications and your a beginner maybe visual basic or even QBasic would be a simple tool to use.
Creating a programming language is not the same as implementing it. You could create a programming language without knowing anything about programming. A programming language is just syntax and rules.
There are many ways a programming language can be implemented. One doesn't necessarily need to know assembly to write a compiler. Many of the compilers in the GNU toolset compile to C, and then use GCC from there.
vcjr, I think you have the wrong motivation for wanting to create your own language. Yes it certainly is possible, but people usually create new languages to do things that other languages cannot. Bjorne Stroustrup didn't create C++ because he couldn't figure out C, he created it because he felt there were limitations that C could do without.
This post has been edited by Tom9729: 3 Oct, 2008 - 12:02 PM