3 ms·
I have to say, I was trying to learn Clojure (instead of Common Lisp) and actually fell in love with Haskell when a friend explained that I don't have to write
by js8 11y ago
I have to say, I was trying to learn Clojure (instead of Common Lisp) and actually fell in love with Haskell when a friend explained that I don't have to write the type signatures - almost at all. Indeed; previously, I was rigorously doing type signatures on all functions in Haskell, and found it very annoying.
The only downside of that was it made sometimes harder to figure out the error. When you get run time type error, you can do the traces on the values and see where it happens more easily. In case of static typing error, you cannot even start the program. But perhaps this just requires some better practice.
And I also experienced the "when it compiles, almost correct" proverb from Haskell community.
The other thing that converted me to Haskell from Lisp was that I learned (theoretically, so far) about how to write interpreters using free monads. And you get type checking with it.
- mamcx 11y agoType inference is cool for write fast but defeat the point of have a type system (IMHO). I'm using F#, and without a IDE that tell me what kind of crazy type is the code I'm looking right know I can't function. I have used delphi (love it!) and write the types is so minimal, and the benefit of clarity are great. I use a lot of python, I'm used to be unsecure about what exactly the types are. I use F#, and I'm even more unsecure about it. Is kind of infurating that the compiler know what the types are, but all of that is hidden to me! P.D: Type-inference is the thing I like less from F#. All the rest is great to me (Pattern matching, AGDT, etc). I wish the editor show me the types in read mode but I can write without type all in write mode. So, I write "a + b" and then when move out the line, the editor show "a:int + b:int" or something like that. That could truly be the best thing about the 2 worlds.