5 ms·
> Also, its very strange to see these concepts illustrated with Javascript. Indeed. And I don't like it at all. It seems as if everybody is afraid that web de
by wereHamster 10y ago
> Also, its very strange to see these concepts illustrated with Javascript.
Indeed.
And I don't like it at all. It seems as if everybody is afraid that web developers won't understand the concepts if they are expressed with mathematical symbols instead of JavaScript functions.
- Waterluvian 10y agoHonestly I want both. The mathematical expressions, and an implementation in any language. I never took math in university and am woefully deficient. But the past few years proved to me that I'm 100% capable of learning the concepts. I just really sorely need examples in a syntax I understand.
- wereHamster 10y agoSyntax is easy to learn if you know the mathematical concepts. The other way around... not so much.
- k__ 10y agoall those symbols in haskell aren't really helping, even if the syntax is easy to learn...
- eru 10y agoMost of the funky symbols in Haskell are library defined operators. You can define your own in a single line of code. They behave just like functions, just with an infix syntax by default, instead of prefix. You can use Hoogle (eg https://www.stackage.org/lts-6.9/hoogle?q=%3E%3E%3D https://www.stackage.org/lts-6.9/hoogle?q=%3E%3E%3D) to look them up. It's a bit daunting at first. But most code actually only uses operators from at most a few libraries. Once you understand Monoid, Applicatives and Monads and their operators, you'll be doing OK. There are alphabetic names for their operators. But they are not used much---working programmers prefer the symbols. Alas, learning wouldn't be much easier with them either, because most of the work is in understanding the concepts. People would complain just as much about the cryptic names as about the cryptic symbols. (The only mainstream library that really goes crazy with the symbols is 'lens'.)
- k__ 10y agohm maybe you're right. I saw one of the problems was, that I had higher math in German and some translations aren't straight forward (monoid -> halbgruppe) so I often thought things I knew were entirely new concepts.
- eru 10y agoOh, if you had some higher math you are already ahead of the game. (I did the same, but I got lucky and had heard of Monoide even in German.) Yes, it's a bit of a shame that some things are so abstract that we can really give it good names. For example, the operation in the monoid is just any old operation that's associative. What name do you want to call that? I don't see anything that improves on the little Kringel that we make on the black-board, or the <> that Haskell uses.