4 ms·
I think the point is that if you did get into C++ you'd get a pretty good grasp of the keywords and other common identifiers without even having to look them up
by shock-value 13y ago
I think the point is that if you did get into C++ you'd get a pretty good grasp of the keywords and other common identifiers without even having to look them up. They are mostly all designed to appeal to intuition.
>Concepts like Functor and Monoid and Monad are extremely simple. You don't need to go back to school to learn them.
The issue here is not at all how complicated the concepts are. The issue is how common and/or descriptive the name for them is. "Monoid", to someone who hasn't studied abstract algebra, is neither. Something like "Appendable" might be more appropriate for C++.
- freyrs3 13y agoNot every monoid has an append operation, most don't.
- dllthomas 13y agoTo be fair, Monoid's operation in Haskell is called 'mappend'.
- dragonwriter 13y ago"Haskell calls it that" isn't the same thing as "its a good descriptive name".
- dllthomas 13y agoOf course.
- velis_vel 13y ago> Something like "Appendable" might be more appropriate for C++. So I can append False to True to get False (Boolean monoid under &&) or append 8 to 9 to get 72 (integer monoid under multiplication)? There's also a monoid instances for any single-argument function into a monoidal type, where (f <> g) x = f x <> g x; I don't know what to call that but it's definitely not appending. Append is a name that works in a few cases but horribly breaks down in the general case.
- nzp 13y ago> "Monoid", to someone who hasn't studied abstract algebra... Oh come on, man! I can't believe this ridiculous discussion. I'm not lashing out at you, don't get me wrong, but seriously, you think you need to study abstract algebra to understand what a monoid is? Um, I remember one of the first things mentioned in the, literally, first lecture in undergraduate course on calculus was a monoid, among other algebraic structures. Granted, it was theoretical physics, but still, I doubt any respectable university teaching CS would fail to give students at least some familiarity with basic algebraic structures. But you don't even need a university education to grasp this, seriously, stop being afraid of precise terms, there's nothing scary behind them. EDIT: And to actually address your point :), "intuitive" can only go so far. Sometimes there is simply no intuitive term that can do justice to the concept at hand. As Feynman once said: "I'm not going to lie to you, I'm not going to tell you it's like a ball bearing on a spring because it isn't." Especially in programming I'm not convinced that intuitiveness of a mere label for something is a valuable goal. You can't program on intuition, at some point you just have to learn how the thing really works.
- shock-value 13y ago> you think you need to study abstract algebra to understand what a monoid is? No no no. My whole point is that while the concept is not complicated, that particular term ("monoid") simply isn't common. I agree with your edit section though. And I don't necessarily think C++ shouldn't adopt the term 'monoid' due to its relative obscurity (especially if no better term can be found); I just think it's got some figurative points against it for that reason.
- dllthomas 13y ago"Why is it that 'positive integers and minimum' is appendable, but 'integers and minimum' isn't?"