tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.02k stars 48 forks source link

Simplifying and unifying syntax #172

Closed porky11 closed 6 years ago

porky11 commented 7 years ago

In the thread on google you thought it would be more uniform if linkage was not written inside the declaration of definitions. (def x (… linkage …)) could be written as (def x linkage (… …)) then anonymous functions would look more similar to function declarations. What about this change?

Some other idea I had is adding macros, which expand to def forms (for example defn, def-macro, def-struct and def-var) to be more uniform with other macro-def-forms (like def-enum, def-variant, def-concept, def-concept-macro, etc.). (it would also make sence to drop the def-forms entirely maybe) Using def- forms has some benefits: no unneccessary brackets, writing macros, which work for multiple def-forms, is easier, you see immideately, what is defined. friendlier to lispers. maybe also all macro-def-froms should take a linkage (like def-concept and def-recursive-macro but in these cases, it probably won't be useful, not to be extern)

tomhrr commented 6 years ago

After thinking about this some more, the current syntax will remain as-is, for two reasons.