Re:The Egison Programming Language
by kristopolous on Saturday April 29, 2023 @06:25PM
(#35757853)
Thanks. As a correction, the comment you are directly replying to is the only one that I personally made.
I just happened to agree with the sympathies of the first person and was trying to rephrase things in a more productive and positive manner.
I appreciate the response not only for myself but for others who may be reading it as well. Thank you for taking the time.
i appreciate both the correction and the appreciation
Re:The Egison Programming Language
by imtringued on Sunday April 30, 2023 @05:14AM
(#35760915)
>or writing assembly instead of c, even though they're both at pretty much the same level of abstraction
They aren't.
(minor correction, :: is evidently list construction, as in ocaml or haskell, not a type annotation)
you asked what `matchAll primes as list integer with` meant ('what is the second line, a comment?') but apparently the person who answered you didn't understand that you didn't understand. it means 'evaluate the expression `primes`, which should have the type `list integer`, and then attempt to match the value resulting from that evaluation against each of the following expressions in order'
deep math isn't simple to do even when you know what it means; it isn't just a matter of learning what all the symbols mean. this is just a matter of learning what all the symbols mean, like reading chinese instead of english
with a good notation, cramming lots of symbols onto a line is a really good lever to empower your reasoning ability. consider trying to explain how to play the seventeenth measure of pachelbel's canon in words. or writing assembly instead of c, even though they're both at pretty much the same level of abstraction
i'm guessing that #() (the only weird part) is analogous to ${} in `-strings in javascript or "-strings in ruby: it embeds an expression to be evaluated in a context where you wouldn't normally expect expression evaluation, in this case a pattern for pattern-matching
(disclaimer, i don't actually know haskell, though i've implemented my own programming language featuring pattern-matching)