DEV Community

Discussion on: How do you feel about braces and semicolons?

Collapse
 
eljayadobe profile image
Eljay-Adobe

No braces, no semicolons, lots of parentheses (Lisp, Scheme, Clojure).

Braces and no semicolons can also cite JavaScript, because of the magic of JavaScript's automatic semicolon insertion. The flamewar between Crockford's SEMICOLONS, DAMMIT! camp, versus Eich's SEMICOLONS ARE UNNECESSARY camp will go down in the annals of history along side tabs-vs-spaces and emacs-vs-vi and curly-brace-indentation holy wars.

My favorite languages are: D, Python, Lua, F#. So what I syntactically prefer is all over the map.

Having tried my hand at creating my own programming language, I can give a few bits of advice.

Firstly, write a short but non-trivial program in your proposed language. Get a feel for it. Tweak it.
Before you actually begin to implement the interpreter.

My second bit of advice you already have covered: look at other languages, and see what you like or don't like.

My third bit of advice you probably won't like, so I will refrain for now. So as not to dampen your enthusiasm.

Collapse
 
cad97 profile image
Christopher Durham

Is the third bit of advice "don't"? Having spent way too long designing an "implementing" a toy language of my own, my first advice to anyone looking to make a toy language would be "don't".

Collapse
 
eljayadobe profile image
Eljay-Adobe

lol ... the third bit of advice is: it's hard, and takes a long time. And if by some miracle the language becomes popular then you'll end up doing hard time and manual labor (i.e., you'll have to write the manual).

I lifted the manual labor joke from Bjarne Stroustrup.