News for hackers. Stuff that matters.
Re:I got asked LeetCode questions for a dev-ops systems engi... by tene on Friday June 14, 2019 @05:22PM (#20186767)
What structure do you believe Haskell forces on your code?

My experience with Haskell is that it's the most expressive and flexible environment for exploring different ways of structuring code that I've ever used. I've seen everything from extremely-imperative code carefully managing memory allocations and munging bits, to very abstract high-level libraries that declare abstract computations that can be interpreted or executed in a variety of ways.

I'm very confused and surprised to see someone assert that Haskell forces a particular structure on your code.

Re:I got asked LeetCode questions for a dev-ops systems engi... by pjscott on Friday June 14, 2019 @07:27PM (#20187493)
Haskell doesn't force anything, but it does make some pretty strong suggestions. Haskell suggests immutable data, pure functions, and algebraic thinking. You can make your data mutable, do everything in the `IO` or `State` monad, etc., because Haskell doesn't force structure on your code -- but the suggestion is still there, whispering in the back of your mind.

(This is what I love about Haskell, BTW, so please don't read this as a criticism.)

Re:I got asked LeetCode questions for a dev-ops systems engi... by fiddlerwoaroof on Friday June 14, 2019 @07:49PM (#20187587)
This is what I was thinking: if I just want to sit down and design myself an object system, Haskell’s type system gets in the way of the necessary parts. (Unless you want to limit the interaction between your object system and haskell’s types in annoying ways). I’ve implemented CLOS-style mutimethods as a handful of functions basically translated from the Common Lisp in the art of the meta-object protocol. And the multimethods work transparently with any ja type.

This isn’t a criticism of Haskell: there are plenty of benefits to forcing declarative IO and limiting the language (roughly) to features that don’t break type-inference, but those advantages of Haskell make it much less enjoyable to experiment with programming paradigms in.

Re:I got asked LeetCode questions for a dev-ops systems engi... by tene on Sunday June 16, 2019 @04:51PM (#20197805)
Thanks for the clarification!