News for hackers. Stuff that matters.
Re:Haskell in Production by nightski on Thursday October 17, 2019 @02:04PM (#21284750)
If you know F# you are going to feel a lot more comfortable than coming from say C/C++/C#.

The largest difference imo between F#/Ocaml and Haskell is the evaluation model where Haskell is lazy by default.

Re:Haskell in Production by runeks on Friday October 18, 2019 @01:14PM (#21293164)
IMHO the largest difference is purity.

Not being able to mix IO and non-IO functions like this

    print “Enter name:”
    print (“Hello “ ++ readStdinLine ++ “!”)
in Haskell means you have to learn a new way of writing IO code.
Re:Haskell in Production by nightski on Friday October 18, 2019 @02:42PM (#21293990)
Not really. You can mix them in Haskell too. Think of F# as Haskell except you are always working in the IO monad. Haskell doesn't require a "new way of writing IO code" at all. It just allows you to separate out the IO from the pure in a way that can be enforced by the compiler. But there is nothing preventing you from writing all Haskell code in the IO monad if you were so inclined - which is essentially OCaml/F#.
Re:Haskell in Production by tome on Friday October 18, 2019 @03:52PM (#21294551)
> Not really. You can mix them in Haskell too.

True, but it's not particularly syntactically convenient.

Re:Haskell in Production by nightski on Friday October 18, 2019 @04:49PM (#21294961)
The entire point of monadic (do) syntax in Haskell is to make this convenient. I'm not following you exactly.
Re:Haskell in Production by tome on Saturday October 19, 2019 @02:36PM (#21299981)
runeks mentioned

    print “Enter name:”
    print (“Hello “ ++ readStdinLine ++ “!”)
which can't be written like that with do notation. It's also pretty confusing code to write in any language, so maybe that's not a problem.
Re:Haskell in Production by nightski on Sunday October 20, 2019 @10:34AM (#21304394)
True, do notation does require you to add a line -

  main = do
      print "Enter name:"
      name <- getLine
      print ("Hello " ++ name ++ "!")
But I only said that it makes this convenient not that it allowed you to write any statement you want. It still makes it easy to intersperse pure and non-pure code.