News for hackers. Stuff that matters.
Re:Ask HN: Why would anyone choose Haskell to develop applic... by bluefirebrand on Sunday March 06, 2022 @11:29AM (#30578656)
I prefer Javascript/Go/Python because most of my code is actually doing something instead of just conforming to a Gang Of Four pattern designed to paper over the shortcomings of my tool.

I too want my programmers to be thinking about and solving my business problems, not writing boilerplate.

Re:Ask HN: Why would anyone choose Haskell to develop applic... by hackerfromthefu on Sunday March 06, 2022 @03:23PM (#30580899)
Do you prefer your English communication from people with limited English language proficiency, because they have things to say without attention to grammar, precision, and logical structuring?

Lack of understanding of nuance works about as well in programming languages as it does in English - it's very limited and causes issues, which often the low vocab user is simply not aware of. But the issues exist nonetheless.

Essentially you are arguing for a low level of education in the craft of programming, and this is why many (experienced/career professional) people tend often select against users coming from those languages.

Another poster just down agrees with you, but notice they mention they started with Python, which is a beginner language with limited detail, and can't grok why they need to learn more to use Java and why it's worth it. I agree, they can't understand why, but that doesn't mean there aren't valid reasons. It just means they have more to learn, and 'don't know what they don't know' (yet, hopefully).

Re:Ask HN: Why would anyone choose Haskell to develop applic... by bluefirebrand on Sunday March 06, 2022 @06:40PM (#30582404)
To borrow your language metaphor, I find it's more like dealing with people who are capable of communicating complex ideas with simple vocabulary, versus people who can only communicate complex ideas using extremely technical jargon.
Re:Ask HN: Why would anyone choose Haskell to develop applic... by 7thaccount on Sunday March 06, 2022 @01:28PM (#30579747)
I think you hit the nail on the head. As someone who started the bulk of my programming in Python, I found learning Java to be an excercise in frustration as there is so much you have to learn about design patterns and all of that mess. It seems to come up 500x more than in Python which is like here are a bunch of high level data structures and objects and how to use them, so go have fun.
Re:Ask HN: Why would anyone choose Haskell to develop applic... by lacerrr on Sunday March 06, 2022 @11:44AM (#30578775)
Can you give an example of what kind of boilerplate you mean? Because I feel like modern Java and Kotlin have improved a lot in this area.
Re:Ask HN: Why would anyone choose Haskell to develop applic... by collyw on Tuesday March 08, 2022 @08:56AM (#30599889)
How do you open a file and print "hello world" these days? It was at least a screen full of code the last time I looked at Java, but that was a while ago.
Re:Ask HN: Why would anyone choose Haskell to develop applic... by bluefirebrand on Sunday March 06, 2022 @11:51AM (#30578841)
"Code to interfaces instead of implementations" type boilerplate

Code that doesn't do anything except support a design pattern you're following is boilerplate.

Re:Ask HN: Why would anyone choose Haskell to develop applic... by lolinder on Sunday March 06, 2022 @12:10PM (#30579021)
This sounds like less a problem with Java or Kotlin and more a problem with the development team. If you're dealing with a bunch of new developers who just barely read the GoF book and think it's a prescriptive guide to all things code, you're going to end up with a lot of boilerplate. But if you turn a bunch of new developers loose in any language without supervision, they're going to build something bad.

There's nothing in the languages themselves that forces you to use inappropriate design patterns, and as the parent mentions, modern Java and Kotlin have improved a ton in reducing boilerplate. I'm not actually sure what it is that you think they're missing that Python or JavaScript have, unless it's just that you prefer dynamic typing.

Re:Ask HN: Why would anyone choose Haskell to develop applic... by hackerfromthefu on Sunday March 06, 2022 @03:31PM (#30580980)
The issue here is the experience level of the devs. These sorts of conversations should have people declare their years of programming experience at a minimum, it helps to understand perspectives better.
Re:Ask HN: Why would anyone choose Haskell to develop applic... by lolinder on Sunday March 06, 2022 @11:59AM (#30578909)
> I prefer Javascript/Go/Python because most of my code is actually doing something instead of just conforming to a Gang Of Four pattern designed to paper over the shortcomings of my tool.

Which shortcomings of Java/Kotlin are you referring to? What features are both present in all of JavaScript/Go/Python and absent from Java/Kotlin that have any relevance to the Gang of Four patterns?

Re:Ask HN: Why would anyone choose Haskell to develop applic... by Mawr on Monday March 07, 2022 @08:57PM (#30595642)
> What features are both present in all of JavaScript/Go/Python and absent from Java/Kotlin that have any relevance to the Gang of Four patterns?

For example:

1. Being able to define a top-level function

2. Being able to return a function

These either shoehorn every codebase into OOP or force the usage of design patterns.

Mind you, it's possible that if you're writing strictly modern Java/Kotlin/whatnot then these are fixed/irrelevant, but that doesn't erase the billions of overengineered lines of code out there.

From [1]:

> Abstract factory adds another level of abstraction to factory method. While factory method abstracts the way objects are created, abstract factory abstracts how the factories are created. The factories in turn abstracts the way objects are created. You will often hear the abstract factory design pattern referred to as a “factory of factories“.

This type of insanity is exactly what the parent is referring to. Layers of needless abstractions that paper over the lack of basic features every other language has.

[1]: https://springframework.guru/gang-of-four-design-patterns/ab...