Luxe said:
I am in a class where we are studying concepts and design of programming languages. For a project we are suppose to design our own programming language or come up with some alternative project idea to do for the class.
So, my question is... do ya'll have any ideas for an interesting and useful new programming language?
or Any ideas for an alternative project?
Thanks-
There are many things you can do.
The first thing you need to do is decide on the scope and context of the language and where/how it will be applied.
Here's three examples that are in the real world:
1) Assembly x86
This is basically the standardized instruction set that most PC CPU's recognize and execute. Every instruction in the set, the flow-control, data structures (ie registers and their size, memory and how it is addressed), and everything related to the executable code and its context is dependent on the instruction set.
Most high level languages have to at some point run machine code (the binary format that is converted from the "literal assembler definition") and thus the functionality of what you can do is restricted by the domain of the assembly instruction set (assuming it maps directly to the machine language definition).
If you wanted to say write some new kind of Java/C++ etc you need to see how this relates to the instruction set of the actual machine and then based on that you can build your new high level execution language based on whatever new particular paradigm you are introducing.
In a nutshell, if you understand your hardware architecture, and how you can get your new language to relate to the language used by your CPU (either directly or indirectly) then you will be in a good position when writing the compiler to compile your executable language into assembler and then machine code which is needed to run your program.
2) Markup
An example of a markup language is HTML.
Although you can get and execute code from web pages, the main feature of the markup language is that it is a descriptive language as compared to say an executable language like C++ or Java. Rather than providing literal code to do something, the language provides a high level descriptive language like "Write this text" and "Write this at size 21 in italics and bold and make it a hyperlink" and so on. In relation to the executable code above the context and scope of the language is vastly different and as such everything from syntax to semantics is also different.
Using the above example, you might want to pick some kind of software that you are familiar with (web browser, popular game that allows modifications, computer graphics software) and if the application is data driven (web browser, Quake III, some computer animation products) basically anything with a data driven front end will provide you with some ideas about language and how it fits in with a specific domain and will help you come up with innovations on that particular paradigm.
3) GPU programs
GPU programs are programs that execute on modern graphics cards. They have a particular instruction set and are a lot more limited than your standard x86 instructions.
They provide you with a new environment and scope very different to the generalized notion of the x86. They are built for performing many parallel instructions at once (ie they have many core units not just one) and are tailored specifically to two pipelines: vertex and texture/pixel.
If you are interested in computer graphics you can get good development kits for these and good integrated development environments for these and see what its all about.
So in closing up I'll state a good way to go about your project
1) Pick an area that you are interested in where the area is completely data drive
2) Look at the area and see the kind of language that is used to describe that data
3) Analyze and learn the "language" and think about improvements or additions or
perhaps merging of different languages/scopes/ideas etc
Good luck!