1. 31
  1.  

    1. 9

      Submitted 11 months ago, has comments: https://lobste.rs/s/0xsnfj/8_months_ocaml_after_8_years_haskell

    2. 5

      The insights from someone who has serious experience is incredibly valuable.

      But I find myself a bit perplexed. I fully understand the complaint (of Haskell) that there are many ways to solve each problem and these sometimes don’t work together or make your build chain and tooling unstable. I fully understand the complaint (of Haskell) that error messages are unhelpful.

      I do not fully understand what appears to be the author’s largest complaint: that there are several libraries available to solve most problems and so a programmer is forced to choose. Why allow this to be a drag? Let someone publish their list of library preferences. Or pick the library that DOESN’T require you to recompile your IDE. Or pick the one that is first in alphabetical order. I don’t see why more choices is harmful. (Except perhaps if fragmentation of effort means that none of the libraries is actually complete.)

      I’m sure there IS something behind this claim. What am I missing here?

      1. 14

        In my personal experience, choosing a library for an industrial project comes with the implicit responsibility of choosing the “best” one—or, at least, not a clearly inferior one—per some calculus of “best.” Further, the decision process might go into an ADR or similar documentation, just depending. These qualifying factors include things like assessing the amount of the library’s API churn, or the primary library’s author history of abandoning projects. How long might this library be maintained (think Lindy effect)? Is there a big semver major bump coming up for the library such that its documentation is dithered and you’ll also need to go water it in a month? Is its interface layer ergonomic for your anticipated use cases? Do the library’s motivations make sense, and are they aligned with your goals (ex. performance, simplicity, API alignment with a framework that you’re using/not-using, etc.)? Yes, I understand that libraries should be a black box, but if you think you’ll potentially reach or exceed the boundaries of the library’s capabilities, then you might want to assess the readability of its code (and/or perhaps check its test suite). Is its documentation robust, yet also commensurate, length- and tone-wise, with the library’s impact or importance for your project? Has the primary corporate sponsor changed a project’s license for a similar library in the past? What are the general vibes of the main authors/maintainers (ex. ghost, dilettante, star-grabber, well-known serious industry veteran, algorithm wonk, etc.)? Then there’s baseline stuff like licensing and “is it performant?”.

        So I would say if I’m faced with one single JSON library that I need in an ecosystem that seems roughly right, I would circle the car real fast, kick the tires, grab the keys and drive it off the lot. If I’m in a different ecosystem and faced with 10 JSON libraries, then I know that I’m going to have spend time doing at least some of the vetting mentioned above.

        Less serious projects have lower stakes, so calibrate effort accordingly.

      2. 3

        The drag I found was that there’d be a handful of incompatible libraries defining some core data structures within a field, and the rest of the libraries would be pretty evenly split on which one they depend on. Then you end up doing manual dependency resolution, rewriting things a dozen times out of indecision, reimplementing functionality you know already exists but can’t use, trying some horrible lossy conversion between the competing ecosystems, and so on.

        IIRC I found this in audio, MIDI, 2D/3D graphics, and probably more.

        1. 2

          Oh! That seems to me to be a much stronger case than the other reasoning I have heard. It’s not arguing that I need to expend time worrying about which library to use (which could be eliminated by simply picking one and foregoing the benefits of all the others). This illustrates that multiple libraries can be strictly inferior to having a single library, because it causes splits in OTHER libraries that depend on it.

    3. 4

      I would have liked to see some runtime considerations, such as comparing the GCs, or performance pitfalls of Haskell’s default laziness.

      1. 1

        Waddayatalkinabout