1. 28
  1.  

  2. 8

    What exactly do you mean by ‘ML-family’?

    Personally:

    About 10 years ago I wrote most of my code in Python. Since then I’ve dabbled in the following and feel that I’ve benefited from doing so:

    • Haskell
    • Idris
    • Purescript
    • OCaml
    • Standard ML
    • F#

    I agree that it doesn’t really matter which you pick. Elm is probably fine too, though I haven’t tried it.

    1. 14

      I think all of those would count. I’d add ISWIM, SASL, Hope, KRC, Miranda, and Caml.

      Here’s an ascii family tree I made a while ago:

            (Lisp)-----\          /---ML-----Caml---OCaml----------------F#
                        \        /     \_____________            (C#)---/
                         >---ISWIM                   \
              Cobol     /        \----SASL---KRC----Miranda---Haskell---Idris
             /         /                                            \
           Fortran---Algol--BCPL---B---C--\-/--C++---\        /------Pizza---Scala
           /           \                   X          \----Java
      Speedcoding       \---Simula---\----/ \              /  \---C#
           \             \            \      >---Objective-C
            Assembly      >--Scheme    \    /
                         /        \---Smalltalk---Self---NewtonScript   /---Io
       IPL---Lisp-------<         _____/    \              \           /
              |\         \       /           \              \--JavaScript--Coffeescript
              | \         \---Logo---Alice    \                        _____/
              |  \                             \                      /
              |   \---Maclisp---Common Lisp-----&-----Dylan---\-/---Ruby
              |                                  \             X
              |                       (C)--------->---Perl----/-\---Python
               \---APL---J                       /      \               \---Julia
                                      awk&sed---/        \---PHP
      

      Really this family branch could be called the “ISWIM family”, but Haskell does have ML lineage by way of Miranda.

      1. 2

        That family tree at the Computer History Museum is severely lacking…

        1. 4

          All language history trees suck for some reason or another.

          My school had this one, which is rather flawed but at least it’s easy to read, with the bold letters and use of color.

          O'Reilly has one but it’s too spread out and hard to see everything.

          This one has no sense of timeline, and this one has lines going everywhere, difficult to follow.

          1. 2

            I’m convinced the only near accurate one is the one on Wikipedia.

            1. 2

              Link?

              1. 3

                This is the only one I could find: https://en.wikipedia.org/wiki/Generational_list_of_programming_languages

                After a brief perusal, it does indeed look pretty good (although not exactly easy to read).

                1. 2

                  There’s a decent one that’s linked off that page.

      2. 4

        What exactly do you mean by ‘ML-family’?

        Really, anything with a mostly inferred static type system will do. I’d describe most of the languages you list as ML-family though - they’re all at least somewhat descended from it.

        1. 2

          Fair enough. I suppose after reading your first paragraph I was wondering whether you consider Haskell to be ML-family or not. FWIW I don’t draw much of a distinction between Haskell and the others on that list, though Haskell does seem to live in a kind of sub-family with Idris, Purescript, and (from what I’ve seen) Elm.

          1. 3

            Yup! Haskell has ML-lineage but also gets some unique ideas from David Turner’s series of languages. From KRC “Kent Recursive Calculator” it gets lazy evaluation and list comprehensions. From Miranda it gets functional purity.

      3. 4

        This is probably a game worth playing. If people are making this error when using Hypothesis, they I’d expect them to be making it in many other places too. I don’t expect many of these errors are making it through to production (especially if your code is well tested), but they’re certainly wasting time while developing.

        It’s worth learning such a language, sure. But I’d say it’s also worth continuing to use such a language, for the same reason. I used to be a Python fan, but when I briefly did some more Python after a few years of Scala, I was surprised to find there wasn’t anything I preferred about it any more.

        1. 13

          Python the language itself is fairly banal. It has a few nice features, but its greatest virtue as a language is being mostly inoffensive

          But it really has two great features for me. They don’t make Python the only language I’ll ever want to use, but they do pretty much ensure that I will keep using it:

          • The ecosystem is really very good.
          • The community is excellent.

          Scala in particular and functional programming in general have never been able to make either claim. I used to be fairly heavily involved with Scala, and I can’t say that I miss it at all (and have done some recent Scala exploration that mostly confirms that).

          1. 3

            What do you mean by “ecosystem”? My experience is that the tools (IDEs, debuggers, profilers, monitoring and the like) are better than those for Python, that the average library in Maven Central is much higher quality than that in PyPI (and maven itself is much, much better than pip/virtualenv), and that there are is a broader range of libraries available if you’re willing to tolerate a crappy API. (If you’re not, I’m not sure which wins - on the Scala side we’d have to restrict to pure Scala libraries, of which there aren’t many - but many Python libraries are just as unpleasant to use in Python as a Java library is in Scala).

            I agree that the community is awful (or rather: Tony Morris is awful, but the last effort to remove him was handled terribly, and since then no-one has stepped up to lead and do the right thing). I just stay away from the community these days. It makes less difference than one would think, at least IME. Hopefully once Cats becomes established that landscape will shift.

            1. 2

              What do you mean by “ecosystem”?

              Python gets used in a wide variety of niches. There’s the scientific Python set of libraries, which is generally excellent, the web development ones, which are well, fine. There’s Twisted, which while um quirky has a very wide variety of protocol implementations and a lot of momentum behind it.

              In my particular area of interests (testing), there’s py.test which is really the best testing user interface I’ve encountered, the coverage implementation is extremely solid, it has the best property based testing library outside of Erlang (disclosure of bias goes here ;-) ).

              My experience is that the tools (IDEs, debuggers, profilers, monitoring and the like)

              I find these the least interesting aspect of the ecosystem TBH. Also I do not find the state of Scala IDEs to really be good enough to justify using them, even though they are better than python ones. Lack of good profiling I’ll grant. Debuggers is a bit mixed - I find ipdb a lot more useful than graphical style debuggers, but it does have its limitations in comparison.

              are better than those for Python, that the average library in Maven Central is much higher quality than that in PyPI

              Granting for the sake of the argument this to be true (I have not been particularly impressed with the quality of libraries in Scala or Java), it would still be a lousy metric. There’s a lot of crap in pypi because it’s easy to get started using it and a lot of people are interested in doing so, but there’s also a lot of really good and usable software.

              (and maven itself is much, much better than pip/virtualenv)

              That has really not been my experience.

              and that there are is a broader range of libraries available if you’re willing to tolerate a crappy API.

              The usefulness of the Java library ecosystem has been greatly exaggerated IME, especially given how much of a pain it is to use the just as large C library ecosystem from it.

              (If you’re not, I’m not sure which wins - on the Scala side we’d have to restrict to pure Scala libraries, of which there aren’t many - but many Python libraries are just as unpleasant to use in Python as a Java library is in Scala).

              I totally disagree with the claim that typical Scala APIs are good. Scala is a classic example of people getting far too excited by the language’s feature set when designing APIs

              I agree that the community is awful (or rather: Tony Morris is awful, but the last effort to remove him was handled terribly, and since then no-one has stepped up to lead and do the right thing). I just stay away from the community these days.

              No, sorry. I dislike Tony as much as the next guy, but you really can’t blame community problems on one person. Even if he were the only problem case (he’s not), assholes thrive in a context that allows them to do so and that’s just not how you create a healthy community, especially since he’s been doing this for a decade now. I stopped using Scala in 2008 and I was already bored of his shit when I did.

              It makes less difference than one would think, at least IME.

              Having experienced the benefits of what a good community looks like, I disagree.

              1. 1

                there’s py.test which is really the best testing user interface I’ve encountered

                Better than Hypothesis? :)

                1. 3

                  They do different things entirely, and can and should be used together!

                  Hypothesis is just a decorator library, not a test runner. It exposes functions that a normal test runner then picks up and decides what to do with.

                2. 1

                  Python gets used in a wide variety of niches. There’s the scientific Python set of libraries, which is generally excellent, the web development ones, which are well, fine. There’s Twisted, which while um quirky has a very wide variety of protocol implementations and a lot of momentum behind it. In my particular area of interests (testing), there’s py.test which is really the best testing user interface I’ve encountered, the coverage implementation is extremely solid, it has the best property based testing library outside of Erlang (disclosure of bias goes here ;-) ).

                  Other than the scientific side, sounds very similar to what Scala has. Certainly there’s decent range of web libraries (last time I was doing a webapp in Python I couldn’t find anything anywhere near as good as Wicket for rendering HTML, to the extent that I started writing my own Wicket clone), a number of approaches to async/concurrency (the only part of twisted I understood to any extent - maybe I’m missing something), various testing libraries property-based and otherwise. And there are other areas where Scala has the best libraries going (e.g. Spark, memcontinuationed).

                  Granting for the sake of the argument this to be true (I have not been particularly impressed with the quality of libraries in Scala or Java), it would still be a lousy metric. There’s a lot of crap in pypi because it’s easy to get started using it and a lot of people are interested in doing so, but there’s also a lot of really good and usable software.

                  True as far as it goes - I guess the real point is that Python has a real discovery problem for the good libraries. Having a higher bar for inclusion in the central repository is an incredibly crude way of reducing the time spent combing through low-quality options to find the good library for doing x, but it does work.

                  The usefulness of the Java library ecosystem has been greatly exaggerated IME, especially given how much of a pain it is to use the just as large C library ecosystem from it.

                  Just as large sure, but it’s nowhere near as easy to use a C library from Python as it is to use a Java library from Scala. If we’re talking at the level of “just throw swig at it and use whatever it generates” then it’s actually no harder to do that from Java/Scala. But I’ve seen too many segfaults to want to use a C library unless there’s really no alternative.

                  No, sorry. I dislike Tony as much as the next guy, but you really can’t blame community problems on one person. Even if he were the only problem case (he’s not), assholes thrive in a context that allows them to do so and that’s just not how you create a healthy community, especially since he’s been doing this for a decade now. I stopped using Scala in 2008 and I was already bored of his shit when I did.

                  I do think he’s an exceptional case and other language communities maybe would not have fared any better had a similar person embedded themselves at the same early stage. Still, we are where we are, and the failure to fix it absolutely is an indictment of the whole community.

                  Having experienced the benefits of what a good community looks like, I disagree.

                  Just FTR I did work in Python for a number of years. We disagree then.

              2. 2

                Can you share some details about your recent troubles with Scala?

                1. 1

                  No real troubles, it was just a fairly disappointing experience. I was hoping the situation would have improved a bit in 8 years and it hasn’t really.