Live data from Hacker News

Haskell is our first choice for building production software systems

foxhound.systems

51–60 of 297 posts

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

#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

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

#52

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…

I guess you haven’t spend too much time with Haskell. Haskell types especially generic ones are way more expressive and limit your search quite a bit. The function Int -> Int -> Bool can not reach for a database or anything other than the two Ints it is given.

Why couldn't it be a function that queries a database, like answering "on invoice x, does line y exist"?

Genuinely curious, not that familiar with Haskell, just thought you could use something like parameter binding or similar to construct functions like that.

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

#53
post #33

Earlier quoted context omitted.

having just spent an hour over vscode live share with a student who's learning javascript, I have a pretty good idea. But I've worked with people who saw all compiler errors as things of the devil and wanted to defer as much as possible to runtime.

faculty helps students debug their code?? where?

At my Uni we had students from higher years do volunteer time during lab sessions for lower year students. You would just wander around the lab helping random people who were stuck.

Sometimes there would be some proffessors there too to help you out.

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

#54
post #17

Earlier quoted context omitted.

> the reason they "find that the compiler feels like an annoyance" is because their first exposure to Java / C++ is in school where they have an assignment due for tonight and the compiler won't stop banging pages of errors about std::__1::basic_string > and what the fuck is that shit I just want to make games !!11!1! Well I can't imagine how much more annoyed they'd be when using an interpreted language which lets t…

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, gradual typing is not a strictly enforced as in statically typed languages, but seems people are agree that modularity and abstraction without type signatures is painful in sufficiently large programs.

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

#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?

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

#56
post #38

Earlier quoted context omitted.

In my experience, you quickly develop an intuition for where things are going wrong with interpreted languages. Ex: "Oh, cannot access property x of undefined? Something must be going wrong in y object" Python definitely feels a lot more helpful than JS though. Can't speak for other interpreted languages like Ruby.

The thing is, though, that you mostly only get errors for code that is actually executed. So, your program is only fully type checked when all code paths are executed. In the case of python one can ameliorate this situation a bit by using mypy. At my job I see very often code being broken because, e.g., the signature of a function was changed but not in all places and so on. Now somebody will say that the IDE can sol…

> your program is only fully type checked when all code paths are executed.

The solution to this is to make sure that, during testing, all code paths are executed. And that’s something you should be doing anyway, to find bugs that aren’t type errors.

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

#57
post #36

Earlier quoted context omitted.

I've never hired a Haskell developer, but anecdotally from my friends and associates who have, if you put out an advertisement for a Java/Python/PHP developer you get 500 applications from average candidates. If you put out an advertisement for a Haskell developer you get 5 applications from good candidates.

You probably got 500 applications for Java/Python/PHP, of those 450 average and let's say 50 good. With Haskell you just get 5 good ones. You probably don't start with Haskell as your first language but rather move into it after you are a senior in another language. If you are lousy in Java, you probably won't go and learn Haskell or some other niche language.

That sounds like a reasonable assessment.

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

#58
post #28

Earlier quoted context omitted.

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 I would assume that: (1) Those using niche stuff are less likely to be hiring under the impression that the main measure of skill is years of experience with a language, and (2) those using niche stuff are, on average, doing more interesting work that attract…

I believe it's another example of Paul Graham's Python Paradox, just repeated more than 15 years later

http://www.paulgraham.com/pypar.html

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

#59

Earlier quoted context omitted.

I guess you haven’t spend too much time with Haskell. Haskell types especially generic ones are way more expressive and limit your search quite a bit. The function Int -> Int -> Bool can not reach for a database or anything other than the two Ints it is given.

I guess I read the article and commented on what the article was saying and claiming. Hence the introductory sentences at the top of my post.

Perhaps when you wrote

> Type signature `Int -> Int -> Bool` can be used for a function that does any of the following things

[My emphasis] you meant "can't". That could be one explanation for the confusion that seems to have arisen here.

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

#60

Earlier quoted context omitted.

I guess you haven’t spend too much time with Haskell. Haskell types especially generic ones are way more expressive and limit your search quite a bit. The function Int -> Int -> Bool can not reach for a database or anything other than the two Ints it is given.

Why couldn't it be a function that queries a database, like answering "on invoice x, does line y exist"? Genuinely curious, not that familiar with Haskell, just thought you could use something like parameter binding or similar to construct functions like that.

Haskell functions are pure, which means they can only access/use what is in their parameters, so unless you pass in some extra context (typically using a monad or an effect), you do not have access to the "outside world".
Post reply on HN