5 ms·
I don't think this is drastically limiting, it's a sane subset that gets you 99% of what you need from a function name.
by Zababa 5y ago
I don't think this is drastically limiting, it's a sane subset that gets you 99% of what you need from a function name.
- Jtsummers 5y agoWe use punctuation and symbols in typography and writing to provide clarity. Why not use it in our programs?
- Zababa 5y agoPrograms? Aren't we talking about variable and function names? But for the general case, Lisp does use puncuation and symbols. It just tends to use less. The other side of the balance is operators like ~+#>. Most languages are in the middle ground. All of these options are fine and have their uses. I wouldn't like to see stuff like ~+#> every day, but I like being able to implement <.
- Jtsummers 5y agoPrograms are composed of those things.
- Zababa 5y agoSure, but you don't use a lot of punctuation in identifier names. For example, in JS: function sumOfArray(arr) { return arr.reduce((sum, element) => sum + element, 0) } Now in Scheme: (define (sum-of-list lst) (reduce + 0 lst)) Both have punctuation, but usually not in the identifiers (except for - and _)
- gpderetta 5y agoIn fact we do, but as in typography you do not use punctuation to write words. Then again, I really like '-' in symbol names.