Hi:
I was wondering if anybody knew anything about creating your own programming language.
Thanx
Whoa! Pretty daunting task if you ask me. I have a hard enough time trying to learn a language nevermind think of all of the aspects to a language. Take a look at scheme, for example ;) I'll leave this one up to the experts. You're being forewarned though - this thread might end up being moved to the Computer Science or the Software Development forum.
Ooh, sorry to double post, I just noticed you posted this in the Java forum. I think the closest thing to creating a new language would be something along the likes of AspectJ or Pizza.
AspectJ (http://eclipse.org/aspectj/)
a seamless aspect-oriented extension to the Java programming language
Basically, we all know that Java is, by nature, an object-oriented language. AspectJ allows it to be aspect-oriented, as well :)
Pizza (http://pizzacompiler.sourceforge.net/)
The Pizza language is an extension to Java with three new features:
- Generics (aka Parametric polymorphism)
- Function pointers (aka First-class functions)
- Class cases and pattern matching (aka Algebraic types)
AspectJ isn't so much a new language as an addon API to an existing language.
Designing an entirely new language is indeed a very tough task. You should first try to make interpreters and compilers for some existing languages, then start writing and revising a design document for your own language.
When you have that, create a formal language specification.
Only then should you start building first interpreters and then maybe compilers for it.
Plan on taking a year or more before you write the first line of code on that interpreter, probably 18 months at least before you execute the first line of code written in your new language.
And that's if you have a lot of experience in software design and computer science theory.
AspectJ isn't so much a new language as an addon API to an existing language.
AspectJ and Pizza are both extensions to the Java language ;) I thought that delving into such extensions would be a good introduction to programming languages. Plus, we're in the Java forum so it seemed appropriate ;) hehe
Sure it would be a good start, but as he wants to make a new language it's not what he's looking for :)
Maybe he should look at Jython instead when looking at a language implementation in Java, which is a port of the Python compiler to Java (and they're in need of people as the project is really slow at the moment :)
Sure it would be a good start, but as he wants to make a new language it's not what he's looking for :)
Maybe he should look at Jython instead when looking at a language implementation in Java, which is a port of the Python compiler to Java (and they're in need of people as the project is really slow at the moment :)
When you say "new language" what do you mean?
What level of a language? A high level language are not as complicated as they are tedious to design, with an effecient workforce. But trying to desing another C++ or lower would be extremely copmlicated if ya ask me. Once you do some poctdoctoral studies for computer engineering or computer science, then you may have an idea on how to start. maybe
Why don't you play around in java a little with this idea, I mean, you could program stuff that will act on certain statements entered by the user, and soforth.
Making your own programing languge might be intresting but what did you say to use jython?
Its not that hard. I have a series of tutorials on how to make your own programming language on youtube. Just go the the youtube site and search "how to make your own pgoraming language". The series will take you from defining the syntex of your new language, through the parts of the compiler, to the codding proccess, provided with full source files. And to the first test of your new language. Hope the tuts help !
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.