Earlier quoted context omitted.
If it happens every time then it should be easy for you to give a small example. Please do! It’s very hard to understand what you mean otherwise.
Pattern matching for one. I can prove that 3 cases won’t be met but I have to ‘fill in’ them anyway. ADTs with non-Maybe fields. I can prove that all is fine if this ‘slot’ isn’t filled in. Trying to pass an opaque reference down a function call chain. There’s 3.
Haskell in Production
181–190 of 242 posts
Re: Haskell in Production
#182Earlier quoted context omitted.
Pattern matching for one. I can prove that 3 cases won’t be met but I have to ‘fill in’ them anyway. ADTs with non-Maybe fields. I can prove that all is fine if this ‘slot’ isn’t filled in. Trying to pass an opaque reference down a function call chain. There’s 3.
And these are insanely expensive to deal with over time when you compare to the alternative.
Wow that sounds really expensive! How did you actually measure that in the real world?
Re: Haskell in Production
#183Re: Haskell in Production
#184We are a YC company doing very well, all our back end code is written in Haskell. We have produced a lot of functionality with a relatively small team. I would say we are existence proof that Haskell is good for business.
Who determines that you are a very good company?
The post simply says they are "doing very well" (financially). That is fairly objective.
Re: Haskell in Production
#185Earlier quoted context omitted.
I believe they mean static methods as part of the interface signature, e.g. to define constructor/factory methods. AFAIK there are issues with how Java handles dynamic dispatch that prevent this.
What would calling such a method look like?
Re: Haskell in Production
#186Earlier quoted context omitted.
I’ve met some pretty damn solid engineers who started on Haskell and, even at a junior level in other languages, produce an elegant solution far more easily than a senior engineer in that language. You probably wouldn’t put the code in production verbatim but you can very easily see what’s going on and it isn’t haunted by spectre of early abstraction, which IMO is the biggest flaw of OOP at scale. People think you wa…
Haskell gives one plenty of rope to hang himself on complexity. So much that developers develop an aversion to it as deep as fear. It's unavoidable, the ones that didn't develop it are still buried at the working of their first Rube Goldberg machine and unavailable. You'll see plenty of blogs about a Haskell feature that end with "See? It's organized and safe. It works. Is it worth the complexity? No way! You'll neve…
I've used both quite a bit. Haskell's easier to learn to do well than C++ -- with the caveat that you can write java-style C++ productively without using the language very far. C++ in the "modern" style is more complex than Haskell. There are good reasons for that complexity, but it's still there.
I've seen plenty of projects where people have dug themselves into deep C++ holes -- everything is a template, all the files are headers, and the code is unreadable. These are business critical systems still in use in production worldwide.
The C++ community's really gotten good in the last 5 years or so about reigning in the bad impulses and getting people to write clean, clear, efficient code that has reasonable expressiveness.
Coming into Haskell from C++, I have the same instincts. Haskell's been a pure pleasure. The benefits are really there, and they're easy to get. You just have to think of the trade-offs.
Re: Haskell in Production
#187Earlier quoted context omitted.
If it happens every time then it should be easy for you to give a small example. Please do! It’s very hard to understand what you mean otherwise.
Pattern matching for one. I can prove that 3 cases won’t be met but I have to ‘fill in’ them anyway. ADTs with non-Maybe fields. I can prove that all is fine if this ‘slot’ isn’t filled in. Trying to pass an opaque reference down a function call chain. There’s 3.
> Pattern matching for one. I can prove that 3 cases won’t be met but I have to ‘fill in’ them anyway.
This is a funny one because, no, GHC will not ask you to fill them in! You have to turn on a warning for it to complain. The fact that the warning is not on by default is one of my pet peeves with GHC!
> ADTs with non-Maybe fields. I can prove that all is fine if this ‘slot’ isn’t filled in.
Another funny one, because you can just use `undefined` or `error` and GHC won't complain! Personally I'd probably prefer that it did.
> Trying to pass an opaque reference down a function call chain.
I don't even know what you mean by that.
Re: Haskell in Production
#188Re: Haskell in Production
#189Earlier quoted context omitted.
Pattern matching for one. I can prove that 3 cases won’t be met but I have to ‘fill in’ them anyway. ADTs with non-Maybe fields. I can prove that all is fine if this ‘slot’ isn’t filled in. Trying to pass an opaque reference down a function call chain. There’s 3.
Here’s another that kills me every time, I want to compose where I know types are mismatched and I am okay with a runtime fault downstrean . This is hugely powerful to move very fast in, eg, REPL-driven development environment where you build and verify pieces of code incrementally. Not being able to do this is a enormous productivity killer, relative to say a dynamic/Clojure.
Sounds like another good candidate for `error` or `undefined`
Re: Haskell in Production
#190Earlier quoted context omitted.
They... might? I worked at a Haskell start-up for a bit. Hiring wasn't easy. But it doesn't seem to be easier at the mostly-JS start-up I'm working at now.
I think so. https://insights.stackoverflow.com/survey/2019#technology