If you were to design a language right now which syntax tradition would you follow?
1. C/C++/C#/PHP/Perl
2. Lisp/Common Lisp/Scheme/... Lisp/... Lisp
3. ISWIM/ML/OCaml/Haskell
4. Prolog/Erlang
5. Pascal/... Pascal/... Pascal/... Pascal/... Pascal/Ada
6. FIOC
7. Bash/Ruby
8. BASIC/... BASIC/... BASIC/xBase/FoxPro/COBOL/SQL/FORTRAN77/shit
9. Other
A. Forth
B. Brainfuck
C. INI files
D. XML
E. CSV
1. Lisp for its minimalism and flexibility.
2. FIOC, though it supports pig disgusting one-liners, is capable of very clean imperative code.
3. Objective-C for its message passage parameter syntax that I miss in other languages. Smalltalk doesn't go here because it has too much syntactic sugar I don't like.
4. C-like: C*, Java*, etc.
5. end end end: Matlab, Lua, Ruby, etc.
...
n. Bourne Shell-like: *sh, Perl, etc.
I would have a sh/Ada style block structure syntax where different opening statements have different end statements instead of just plain end. So at least instead of end end end it'd be fi done fi or the like.
I would steal the APL family's syntax for array literals. Write 1 3 -5 7 instead of [1, 3, -5, 7]. Binary operators would be separated from their arguments by whitespace. I might take it a step further and make the leading minus sign part of the number token. Also, you'd be able to put underscores between digits for readability (1_000_000 instead of 1000000).
I like how Clojure has special syntax to indicate tail recursion so I would want to try something like that, but with support for tail calls in general, not just recursive ones. I would also like to support a pragma (or whatever) that prohibits recursion except via tail calls. But that's beside the point.
I like the my and sub keywords in Perl and I'd probably steal those.
brainfuck is the most beautiful language i know. too bad i gives you a headache. if you could just remove the headache-part somehow...
Name:
Anonymous2013-01-07 18:17
>>13
Would you prefer not to have any kind of syntax for declaring a variable whatsoever? Would you rather have the Python behavior where the runtime checks for a variable of that name and creates it in the local scope if it doesn't exist?
Would you prefer not to have any kind of syntax for declaring a variable whatsoever?
Not >>13 here, but declaring variables should not be allowed. If you need more than compile-time macros, you're doing something very wrong.
>>20
So you're against let and the like? Just like those pig disgusting ``scripting'' languages with quirky scopes where you have to quiver in fear whenever you define an inner/anonymous function?
Name:
Anonymous2013-01-08 0:37
>>21
``Quiver in fear''? Are you superstitious? Do you believe the computer will bite you if you don't walk on eggshells whenever using it? Is it a puppet that comes alive and crawls into your mouth at night to take the place of your real tongue?
Name:
Anonymous2013-01-08 0:49
1. JS
In fact, there isn't a need for another new language at all. The creation of Javascript marked the end of, and apex of, all necessary PL development.
>>22 Is it a puppet that comes alive and crawls into your mouth at night to take the place of your real tongue?
Almost there, it is when you bite the puppet tongue in your mouth to get it away from you, only to discover you bit your own tongue, because a new scope didn't come about to shadow the real tongue. Now the puppet tongue is also your real tongue, forever. And then a lambda popped out.
Name:
Anonymous2013-01-08 7:24
>>22,25
Thanks for the nightmare fuel, faggots. Fuck.
Name:
Anonymous2013-01-08 7:25
>>22,25
Thanks for the nightmare fuel, faggots. Fuck.
Name:
Anonymous2013-01-08 7:25
>>22,25
Thanks for the nightmare fuel, faggots. Fuck.
Name:
Anonymous2013-01-08 19:35
And then a lambda popped out.
LLLLLLLLLLLEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLL
LE EGIN GRO LAMBA SCARY XD