4 ms·
Replacing them with ASCII/unicode equivalents rips the guts out of the language. … What have you accomplished? Well, at the very least you've ruined the superbl
by kd0amg 14y ago
Replacing them with ASCII/unicode equivalents rips the guts out of the language. … What have you accomplished? Well, at the very least you've ruined the superbly expressive nature of mathematics through agreed upon special symbols.
I really don't think the small number of keystrokes is what makes this sort of language expressive. Cryptic notation is a cost, not a bonus. Moving from, say, J to C, having to write
log(…)
instead of
^. …
(or ⍟) does not make me feel like I've lost anything. The things that do make me feel constrained are having to explicitly write out loops if I want to apply that operation to an array of numbers instead of just one and not having a convenient way to use that operation in function composition.
- silentbicycle 14y agoIndeed, the brevity that comes from a glyph-oriented syntax is orthogonal to that which comes from having array-oriented semantics (e.g., making loops implicit). You could have a word-based syntax, and still have very concise code. q uses words for its single-argument operators, using "til 10" rather than "!10". It certainly makes a better first impression, but I'm not convinced it matters after a few days. My experience as an enthusiastic k novice is that I recognize idioms from symbols (e.g. "{x@<x}" more directly than I do in words ("fun x at grade-up x end"). Perhaps it's like reading poetry in Kanji, rather than letters?