keean / zenscript

A trait based language that compiles to JavaScript
MIT License
42 stars 7 forks source link

Postfix Notation #44

Open keean opened 5 years ago

keean commented 5 years ago

If IDE tooling, and autocomplete is so important, should functional languages use postfix notation?

((3, 4)add)print

In a way the . is used for this in most OO languages, but with multiple-dispatch, which arguments go before and which after the function name? Perhaps this syntax is more readable?

(3, 4).add.print
shelby3 commented 5 years ago

Dot notation as syntax sugar only.

First argument is always the the one applied by dot notation.