My "Simple" effective programming language

Started by
5 comments, last by RedBitsOfYarn 21 years, 1 month ago
No compiler yet or interpretor for that matter... anyways, here goes the "surface" design of it: -------------------------- EPIAE Every Program is an Expression Programs are ALL enclosed in "()", and can be refered to by outside programs if the program being refered to is running... *whew* The program is refered to by the file name. So, (my_program.ep) would call up my_program.ep. (Of course, once compiled you refer to it as it''s compiled name) Expressions are enclosed in parenthesises. The command that goes with an expression is located inside the parens. So if there was a magical foo command: (foo) Foo would be activated. Sometimes, a command shall need some data inputed into it. This is handled by doing: (foo (bar_data)) The nested () means that data is nested inside. There is one set of () for each command unless others should be nested. To create new commands, invoke the "built-in" command, func: (func ("Function_Name")("code in a string here")) Here, the string, function name shall create a new function, and the "code in a string here" is used to input the needed code. So: (print ("hello world")) would print hello world. Loops are handled with commands. So you would do: (while ("code that must be true for loop to execute")("code")) Variables: (int ("my integer")) (char ("my char")) Math: (add (5)(6)) If you put a + between two sets of parameters, it is the same as multiplying the parameters. Confused? Here''s an example:
  
(
(blah(a))
(blah(b))
)

is the same as 
(
(blah(a)+(b))
)
  
--- Sample:
  
( 
  (int (a)+(b))
  (input (a)+(b))
  (add (a)+(b))
)
   
The strings with "code" in them, depending on what the function or command asks for, might have to be converted into code. (Think the exec() function in python or some other language) (While you''re reading, please make an interpretor... you know... so I don''t have to :-P) Comments? Suggestions? Flames?
Advertisement
Parody of Lisp, or the baby of Lisp and C? You decide.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
Yes, it looks like lisp, and mabye a little C sprinkled in, but you gotta admit, it would be a nice non stormy adventure to use

Some things I should add:

OOP (Easy enough... if you make commands data)
Arrays (My glaring thorn in the ass. My philosiphy is to try and weed out ambigiouties)
Basically, it''s design is to try and stop the usage of too many special symbols (Shifted number keys, the keys next to the letters). The usage of everything is a blah blah blah is to just make it easier.
If you are serious, just use ACTUAL Lisp, and save yourself the work of making a language. It would be a lot easier to spend $50 on "ANSI Common Lisp"(not that you need it, but I find it better than the freely available online books I looked at), learn lisp, and then find a free compiler w/ source to integrate as your scripting language. You can make macros to make (foo (a) + (b)) multiply A and B and then pass that to foo if you really want.

[edited by - Extrarius on March 5, 2003 10:45:30 PM]
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
I don''t know Lisp, though the nested parentheses definitely remind me of SQL commands.

A language idea I was toying with is here.

~CGameProgrammer( );
DevImg.net - Post screenshots, comment on others.
~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Extrarius: But this is supposedly supposed be compiable ready. Either way, i could easily change the parens to [] or {} just as easily. (Not to you extrarius) Anyways, ive never worked in lisp. Are there many sematical differences?

This topic is closed to new replies.

Advertisement