Ultimately it is a dsl. Should equations in math also use full words and comments?
No, they should not. Maybe a nice syntax for grammars like raku is a better approach.
Ultimately it is a dsl. Should equations in math also use full words and comments?
No, they should not. Maybe a nice syntax for grammars like raku is a better approach.
> Should equations in math also use full words and comments?
My "also" referred not to have multiple representations but to also in math have prose instead of equations. I could have expressed it better. I did not think of that interpretation.
As for math, I really do not think that is true. Look at how this beautiful proof is so long in prose.
https://mathcs.clarku.edu/~djoyce/java/elements/bookI/propI4...
Is that better than a^2+b^2 = c^2 ?
https://en.wikipedia.org/wiki/Pythagorean_theorem
Notation helps to be concise. Imagine more complicated things without notation in maths. Of course if you look at Principia Matematica we see the limits of notation as well.
That's why a well-designed DSL tries to make its syntax as self-explanatory as possible. Using "start" instead of "^", or "digit" instead of "d".
We're not doing equations here, we're doing engineering. Analogies to proofs are not helpful. There is a very good reason why, in coding, we give descriptive variable names such as "accountBalance" rather than "b".
Conciseness is not a virtue in programming. Clarity is. Things should not be longer than they need to be -- but neither should they be shorter. The name of something should not be 100 characters long, but neither should it be 1 character long. A word or two is generally the sweet spot.
In languages with an expressive typesystem you see a lot more single letter variables.
> We're not doing equations here, we're doing engineering
This sentence is nonsense.
> Conciseness is not a virtue in programming. Clarity is
I see what you are saying, but conciseness is also related to clarity, as I showed with the theorem.
I just care that things have readable text names rather than inscrutable punctuation and single letters.
Yes, it is a DSL. Just like, you know, Python or C or HTML or CSS. Just because it's a DSL doesn't mean it can't actually use keywords instead of punctuation.