Live data from Hacker News

Haskell is our first choice for building production software systems

foxhound.systems

71–80 of 297 posts

Re: Haskell is our first choice for building production software systems

#71

Earlier quoted context omitted.

I feel like it probably isn’t worthwhile to litigate the merits of static typing every time there is a HN post that’s vaguely adjacent to the topic. For the amount people care about it, there isn’t much evidence in either direction. And most studies that do exist are limited to small programs typically written by novices. Yale’s Singapore campus are going to be running two instances of the same course in parallel soo…

> there isn’t much evidence in either direction Oh, I think there are great evidences, such as: dialyzer, or ruby3 and python3 shifting towards type signatures everywhere and gradual typing, or recent racket focus on typed racket. Oh, and the rise of typescript of course. I mean, I've abandoned Python years ago, and I was quite surprised when I discovered python people are adding type annotations everywhere. Sure, gr…

What you have described is an anecdote rather than any study that attempts to be impartial which is what I really meant when I wrote ‘evidence.’ I’m sorry for not being clear enough.

I don’t feel like this anecdote is evidence because I don’t think it’s inconsistent with the trend towards more static types over the last 5-10 years or so. For this anecdote to be convincing I would need to think that programming language design happens because of carefully thought out and researched decisions and quick feedback as good languages are used and bad languages are dropped, but I don’t believe this.

Re: Haskell is our first choice for building production software systems

#73
post #51

> Many programmers encounter statically typed languages like Java or C++ and find that the compiler feels like an annoyance. By contrast, Haskell’s static type system, in conjunction with compile-type time checking, acts as an invaluable pair-programming buddy that gives instantaneous feedback during development. the reason they "find that the compiler feels like an annoyance" is because their first exposure to Java…

"acts as an invaluable pair-programming buddy that gives instantaneous feedback during development." This is the key bit, this is called static analysis, you don't need a type system in your language to do this, and you don't need to force doing it at compile time Most developers appear to conflate the two, uncoupling static analysis and type systems would benefit most workflows

> you don't need to force doing it at compile time

What assembly instructions should the compiler emit if you write sum ["foo", "bar"] ?

Re: Haskell is our first choice for building production software systems

#74

> Many programmers encounter statically typed languages like Java or C++ and find that the compiler feels like an annoyance. By contrast, Haskell’s static type system, in conjunction with compile-type time checking, acts as an invaluable pair-programming buddy that gives instantaneous feedback during development. the reason they "find that the compiler feels like an annoyance" is because their first exposure to Java…

I learned both Haskell and Rust self-taught an still find the latter's type system a bit of a cage for it's lack of higher kinded types, frankness be. I know not much of Java , but my sentiments concerning C++ are even worse. I do not regularly program in Haskell and far more often in Rust .

"I don't know much about this thing but I don't like it, and I know even less about this other thing and I like it even less!"

For what it's worth, C++ has HKTs in the form of template template parameters, making it possible to write, e.g., monad transformers, which cannot be done in Rust, last I checked. Now as for whether you'd actually want to do this in a production codebase...

Re: Haskell is our first choice for building production software systems

#75
post #55
post #5

Why Haskell is our first choice for building production software systems: a rationalization of our excitement to get to write Haskell in production Here, I've fixed the title

Would you say that you've engaged in good faith with the point the author was trying to make?

Eh, I kind of agree with the parent comment. The author didn't bring up any compelling points that couldn't be found in other modern languages (granted these likely borrowed from Haskell). As an outsider to Haskell I was hoping for some more concrete use cases for picking the language.

Re: Haskell is our first choice for building production software systems

#76
post #48

I dislike Haskell. But this article goes out of its way to make the worst possible case for Haskell imaginable. > Many programmers encounter statically typed languages like Java or C++ and find that the compiler feels like an annoyance. By contrast, Haskell’s static type system, in conjunction with compile-type time checking, acts as an invaluable pair-programming buddy that gives instantaneous feedback during develo…

To clarify the sibling, a signature of `Int -> Int -> Bool` can't do any IO (so no connecting to databases, reading/writing files, network requests), so it does tell you a lot about a function. It can manipulate strings, decode JSON, but both of these are either (immutable) values from enclosing scope, or created within the function. But since they can't be output anywhere (because no IO) then they don't matter. EDIT…

> To clarify the sibling, a signature of `Int -> Int -> Bool` can't do any IO (so no connecting to databases, reading/writing files, network requests), so it does tell you a lot about a function.

It doesn't help if it's `Int -> Int -> IO Bool`, for example. Well, it does do IO, but other than that, who knows. Perhaps it reformats the disc while CPU is idle :)

My main point though is that the article does a very poor job of showing why Haskell is good at, well, anything, compared to, well, anything.

Re: Haskell is our first choice for building production software systems

#77

No, sorry, it has very little to do with technology. There's at least a dozen languages you could have chosen, and that others have chosen for any given use case. within some bounds, it makes very little difference.[0] The reason you've chosen Haskell and, by the way, also the TLD ".system", is that you've constructed your identity in such a way that "advanced language with a steep learning curve" is something that f…

> There's at least a dozen languages you could have chosen, and that others have chosen for any given use case. within some bounds, it makes very little difference.

It's about quality of life and picking the right tool for the job. There are some problems I can solve in Haskell, that I simply could not solve in Java, it would be too hard and too much work. Java is a simple language and therefore it's much easier to reason about the performance and space usage. There are thus many problems where Java would be a better fit.

Re: Haskell is our first choice for building production software systems

#78
post #14

> Many programmers encounter statically typed languages like Java or C++ and find that the compiler feels like an annoyance. By contrast, Haskell’s static type system, in conjunction with compile-type time checking, acts as an invaluable pair-programming buddy that gives instantaneous feedback during development. the reason they "find that the compiler feels like an annoyance" is because their first exposure to Java…

Actually, the reason why I found static typing annoying in the past (and why I felt more productive in Python) were the types are really low level (missing basic things like tuples) and lack of type inference. You have to repeat the type information, a lot. And also you have to declare lot of intermediate data structures. In Python, this became easier and one could focus on the data transformations, thinking about th…

> You have to repeat the type information, a lot.

Nope you don't, that's what typedefs are for. They're underrated for sure though. People don't use them nearly as much as they should. They're incredibly valuable for avoiding precisely this problem.

Re: Haskell is our first choice for building production software systems

#79

Earlier quoted context omitted.

> the types are really low level (missing basic things like tuples) and lack of type inference how far ago was this in the past ? C++ had tuples and type inference for ten+ years officially now - gcc 4.4 had it in 2009

There's also the culture around the language to fold in. A culture of writing code assuming inference and structural typing is quite different than it merely being available.

So, OCaml or something?

Or has Haskell added structural typing?

Re: Haskell is our first choice for building production software systems

#80
post #28
post #19

Earlier quoted context omitted.

> on the other hand you have an easier time to attract the few you need How is it easier to find a Haskell developer vs finding a Java/Python/PHP developer?

I hear far more complaints about how difficult it is to find good people from companies hiring for mainstream languages than from those using more niche stuff, I would assume mostly due to larger competition among employers for the former (and in parts better community access for small shops in niche languages and self-selection of who learns the niche languages)

> I hear far more complaints about how difficult it is to find good people from companies hiring for mainstream languages than from those using more niche stuff

Of course, there is just more of them in the first place. The other effects that you describe might also be true but keep in mind what the base rates are.

Post reply on HN