1. 2

    (the pathologies are gendered weird? why use neutral pronouns for half and female for one and male for another???)

    1. 8

      My friend, there is no pleasing you :) I personally prefer the neutral pronoun “their” “they” even for singular use.

      1. 2

        Agreed. Very troubling. The one female role hints at something many women have spoken about; that their roles are not taken seriously, even when they have senior titles.

        I sent the author an email, explaining this and encouraging him to keep the whole thing gender-neutral. We’ll see.

      1. 1

        Too bad that unlike the rest of the scalac forks, this one seems to be intentionally license incompatible.

        1. 7

          How is the new license incompatible with the previous?

          1. 7

            Paul P’s changes are distributed under the Apache 2.0 license which is compatible with 3-clause BSD license that AFAICT scalac uses.

            @soc, can you please clarify what you mean here?

            1. 2

              While the Apache License 2.0 is technically compatible, mainline Scala accepts only code with a CLA (and licenses it under BSD afterwards).

              The big question is a) whether PaulP’s CLA is still active and b) – if the CLA was still active – whether code made available online counts as a contribution (I’d say no).

              Regarding the CLA, http://typesafe.com/contribute/cla/scala/check/paulp says yes, and considering chapter 8 of the CLA, EPFL needs to be made aware of any changes regarding the CLA’s status.

              Let’s wait and see if there is any movement.

          2. 6

            I think the intent is for Paul to share his work with TypeLevel:

            publishing now and giving [Typelevel] an opportunity to exploit my work seems the lesser evil.

          1. 4

            On the whole I’d agree with the article’s main point that comprehensibility is a very important quality and that, all else being equal, static typing tends to lead to greater comprehensibility than does dynamic typing. That said, a bit of armchair critique…

            Firstly, it only seems to address the matter comprehensibility at function boundaries. While that’s nice to have, I’d argue that intra-function comprehensibility is also quite important (perhaps even more so).

            For reasoning about inter-function behavior, Haskell’s type system is certainly helpful (assuming you can decipher the type signatures, which can be quite a task at times). For other aspects of comprehensibility though, Haskell-as-exemplar seems like an odd choice to me, though that may be mostly a matter of style than the language itself. Admittedly I’m not terribly experienced with Haskell, but the authors of Haskell I’ve seen “in the wild” seem quite fond of sprinkling their code with lots of custom-defined operators – and as a reader, the meaning of $>==>$ in the middle of a function isn’t always so obvious.

            I think the assertion that

            the imperative nature of these languages requires you to perform side-effects in an uncontrolled manner

            is rather overstated. It is certainly possible to write pure, non-side-effecting functions in $IMPERATIVELANG if you want to; I’d say it’s probably even common.


            I can get very close to understanding everything about a method simply by looking at it’s type signature.

            strikes me as unrealistic beyond very simple functions – or even with plenty of simple ones, for that matter. Looking only at the type signature, what does a function of type (Numeric a) => a -> a -> a do? And (to be somewhat pedantic) if it involves division somewhere, the “divisor != 0” constraint does seem like a bit of a “magic dependency…not specified in the type signature”.

            (And as a minor nitpick, the practice of capitalizing certain Semi-Arbitrary bits of Terminology always strikes me as coming off a little pompous.)

            1. 3

              I appreciate the feedback. I am glad to be challenged on these points as they help me think about the problem!

              1. Beyond function boundaries

              I would argue that Haskell’s purity helps the most when looking outside the function boundaries. Specifically because each function provides exactly the context it requires within the type signature, tracing through various functions becomes much easier. Immutability also helps here. When you throw concurrency in the mix, then logic becomes difficult. But this will be case in any language. And,a gain, the immutability and purity of Haskell will help in all of these cases.

              At a very holistic and more quantifiable level, what I’m arguing is that by restricting the set of possible actions via static typing and purity, you restrict the set of possible outcomes. Meaning the human mind does not need to comprehend as many possibilities. And this applies beyond the function boundary.

              2. Syntax

              Agreed. However, you can ignore the symbolic operator and just look at the type. We can argue day and night about symbolic operators versus names, and I will agree that names are more “comprehendable,” but I’d also counter that you rarely “take a function at named value” (if you will).

              3. Immutable $IMPERATIVELANG

              I disagree here. I write java at work often (we use Apache Storm) and writing “pure, immutable” code is made very difficult. The lack of Algebraic Data Types means you have to lock basic data into classes with getters and setters. It means mutating data via shared-structuring is incredibly difficult, so you end up just mutating things. The lack of lazy evaluation means the ordering of my imperative statements matter, which means the order of my effects matter. I could go on, but even doing trivial things that don’t require sophisticated type systems is not easy. Just read that Concurrent Java book!

              Certainly, favouring immutable data structures is prevelant, but lacking the simplicity of Algebraic Data Types and combinators makes anything beyond “immutability” difficult.

              4. Beyond Simplistic Functions

              Here is what I can tell you about (Numeric a) => a -> a -> a:

              • it uses some numeric property, meaning it does something with numbers.
              • there is a finite set of things we ca do with numbers in the Numeric class: (+), (-), (*), abs, negate, etc.
              • this function must only do this kind of math.
              • this function is therefore algebraic
              • the resulting a is the simple result of these algebraic operations.

              Contrast this with the method: def numer_stuff(x,y) in Ruby. We are hopeless. Now: Numeric numberStuff(Numeric a1, Numeric a2) in Java gets us most of the way there, but, this function may mutate a1, mutate a2, or perofrm some side-effect (logging etc.)

              It’s not a big difference, but whe you are tracing through 10+ functions/methods, those little assumptions add up!

              5. Capitalization

              I think this is a product of me writing this over the course of a couple of days. But, I agree.

              Ultimately, I think the case against Dynamic Typing is pretty clear w.r.t. comprehension. However, the case against non-pure languages is more subtle, and is one of those “death by a thousand cuts.” There is no single, clear victory with Haskell or languages like it. However, the experience of understanding and modifying other people’s code becomes much less stressful when several little things disappear. Or, at least this has been my experience, which may be a product of my unique background (mathematics) and immaturity as an engineer.

              Thanks for the discussion!