News for hackers. Stuff that matters.
Re:Haskell People by kmicklas on Saturday September 30, 2017 @02:41PM (#15374342)
It amazes me that someone could write down that principle and then design an untyped programming language.
Re:Haskell People by Roboprog on Saturday September 30, 2017 @03:16PM (#15374564)
Dynamic types can be more problematic to modify, but many of us find them easier to read: assume that the code actually worked and does something reasonable, now skim for the gist of it (without having to see a bunch of extra detail).

Assembler is untyped (just bytes and words). I'm not big into Python, but I'm pretty sure it has types, but they are late/runtime bound.

Dynamic types are probably not a good choice for an army of idiots, but if dynamic types were so completely unworkable, you would think that they would disappear, eh?

That said, I'd rather see avionics written in Ada than Python, but not every problem needs that level of scrutiny and pain.

Re:Haskell People by yen223 on Saturday September 30, 2017 @08:15PM (#15375705)
> assume that the code actually worked and does something reasonable

That's almost never the case if you're in a situation where you're reading code

Re:Haskell People by orf on Saturday September 30, 2017 @05:19PM (#15375037)
Why is dynamic typing (with reliance on duck typing) any harder to read, or more complex?
Re:Haskell People by yen223 on Saturday September 30, 2017 @08:26PM (#15375746)

    def add(a, b):
        return a + b
In a dynamically-typed language, you can't actually know if this dead-simple function will throw an exception, until you know the entire call graph leading up to where this function was called. That's fine in small scripts, but really freakin hard if you have call-stacks 10 levels deep.
Re:Haskell People by orf on Saturday September 30, 2017 @08:33PM (#15375769)
Sure, but it is both exceedingly readable and exceedingly simple. It is pretty much pseudocode. Which is what we are discussing, not type safety in huge codebases.
Re:Haskell People by yen223 on Saturday September 30, 2017 @09:37PM (#15375944)
Thats true in small functions, but that's also true for statically-typed languages with type inference. In OCaml, the same function would also be

    let add x y = x + y
Looks reasonable to me, and this is statically type-checked
Re:Haskell People by Can_Not on Sunday October 01, 2017 @10:35AM (#15378039)
If I were making an argument in this case, I'd say that several other languages have fulfilled the "readability" benefit while also fulfilling orders of magnitude higher performance and type safety garuantees. This implicates that one case is write only instant legacy code and the other will be highly maintainable going forward if the codebase and team need to scale in size.