| > They're not worth discussing because they're a counterintuitive mess Do you really believe Num overloading is a counterintuitive mess? I disagree completely. > OCaml discarded it and forces you to use different operators for real and integer arithmetic Which is pretty terrible. > Haskell's Num hierarchy is troublesome. Yes, but that's an orthogonal issue. > This is one reason students of Haskell find things so confusing: type declarations are necessary at the top level simply because the extensions and complexity of modern Haskell break HM if you try using it everywhere That sounds like FUD to me, a heavy Haskell user. Type declarations at the top-level are generally necessary to avoid the dreaded MR and for documentation purposes. Modern Haskell doesn't heavily use extensions that require type annotations on the top-level. > Strings are edge cases because they are not polymorphic unless you enable OverloadedStrings. Once you do, you will either replace the built-in string with something else (ByteString or Text) or find yourself in the same kind of trouble you'd be in with Num. It lets me use literals for Lazy Text, Strict Text, and String with the same syntax, which is nice. My point is merely that giving a type to a polymorphic initializer is possible, and C++ chose not to. |