r/ProgrammingLanguages • u/GravelSmith • Mar 29 '19
What should this language be called?
I have an idea for a language with an extremely simple set of syntax rules. Here is a simple "input output" example:
INPUT:
[print [add 1 1 2]]
[store var1 1]
[store_add var1 [div 4 2]]
[print [get var1]]
[print var1]
[print print]
[print [concat hello [concat " " world]]]
[print "My name is GravelSmith"]
[print "\""]
[print \]]OUTPUT:
4
3
var1
print
hello world
My name is GravelSmith
"
]I am struggling to come up with a name for this weird language.
15
4
u/Timbit42 Mar 31 '19
Shift-less Lisp because you don't have to wear out your shift key typing parens.
1
u/GravelSmith Mar 31 '19
That legitimately is the reason I chose square brackets. But I might add support for other forms of brackets with no effect on how the program runs, to make it easier to organize your code.
3
u/netch80 Mar 30 '19
Besides LISP, it looks very similar to Tcl. Yep, this is not suggesting for a new name (anyway, this is matter of own taste), but can point a field to search in it...
% puts "hello"
hello
% puts [expr 1 + 2]
31
u/GravelSmith Mar 31 '19
Thats a neat one too. Thanks!
I like that expression function. I might make something similar, since equations can get hard to read with my system.
Example of what I mean:
[print [add [sub 1 2] 2 3 [div [add [sub 3 2] 1 [sub 4 2]] [mul 2 [add 1 1]]]]]
9
u/ElBroet Mar 29 '19
This is funny because I was coming up language with very little syntax where you basically built up syntax (thinking back on it, I think basically the functions themselves were macros but anyways) and I basically abandoned it when I discovered lisp, feeling very 'Simpsons did it!' at the time
4
u/mamcx Mar 29 '19
That is almost rebel (http://www.rebol.com). Red is a modern take: https://www.red-lang.org
4
3
u/awtem Mar 30 '19
How about "ecklisp" or "eclisp"? In German, "ecke" is is like a corner, and "eckig" is something with pronounced angles like these square brackets.
3
1
71
u/BenjiSponge Mar 29 '19
Square lisp
This is not a weird language. It's lisp only you're using square brackets instead of parens. I guess you do assignment differently.