reubenharry / haskell-docs

Creative Commons Attribution 4.0 International
60 stars 7 forks source link

Regarding the target audience of the tutorial #21

Open SomeAcnt opened 1 year ago

SomeAcnt commented 1 year ago

It seems like this guise is geared towards for developers accustomed in python. I doubt this is appropriate audience to introduce haskell.

There is barely any reason that python enthusiasts would ever try out haskell. Usually people learned python because it is easy to learn, haskell is the opposite of approachable. Especially, the obstacles are on two fronts. First, the strict and stringent type system would baffle them. Then, they would choke in the forced purity, as they are used to running action anywhere to get things done. They also have nothing much to gain from haskell, as they are usually more interested in finishing the program as fast as possible without much concerns on safety.

So, why did you choose python developers as the target audience?

reubenharry commented 1 year ago

I see your point, but I disagree.

The target audience isn't Python enthusiasts per se. Rather, it's the large body of people who know (at least) the basics of programming (have written and debugged a few of their own programs, know how to problem-solve) but haven't been exposed to expressive types, laziness and purity. It just happens that in the current times, the huge and increasing popularity of Python means that I can assume most people have had some exposure to it, especially relatively new programmers.

My hunch is that there are loads of people in that pool who would love Haskell but haven't been exposed to it. Or haven't ever run into a good quality, up-to-date, free, on-line and easy-to-consume guide. To me, that seems like really low-hanging fruit.

As an example that Pythonista can learn functional pure programming, consider Jax (https://jax.readthedocs.io/en/latest/notebooks/quickstart.html) which is a very popular deep learning framework. It is functional (scans, map, etc) and pure (manual threading of random seeds required). The fact that a tool like this is getting heavily adopted suggests to me that if they're exposed to these ideas, people used to a language like Python have no problem with them. I think one reason for this is that Python uses functional idioms quite a bit, from list comprehensions to lambdas, to iterators, as well as the functools and itertools packages.

All that said, I'm not hugely wedded to the idea of targeting Pythonistas specifically, and could remove the explicit references to Python if necessary. "Pythonista" is more like a shorthand for "a coder who hasn't been exposed to purity, static types, or functional style".

cdsmith commented 1 year ago

This seems like the right approach. I agree that there's no particular reason to assume previous experience with Python specifically, but aiming the tutorial explicitly with people than have some programming experience, but not with a functional language or with strong static typing, seems like the right approach.

So I feel strongly that the current balance is the right one.

I'd also caution strongly against assuming someone isn't interested in learning Haskell just because of a previous programming language they have learned. People learn languages for a lot of reasons unrelated to whether they might be interested in Haskell. A resource like this should not adopt a condescending or dismissive tone toward anyone based on their background.

SomeAcnt commented 1 year ago

I see, interesting. When I read

for newcomers who have programming experience in a language like Python.

I thought this tutorial is for dynamic typing folks, and for those who like easy and quick learning experiences - which haskell simply cannot offer. Would be great if the statement was more specific.

Also, my observation to this date is that most pythonistas simply learned it because it was accessible and easy to learn, or they like doing things without any restrictions. At least python programmers from my uni was like this, they usually prefer easy way out for programming. I found some Java folks are rather more interested in potential alternative options - sadly, these are usually bound by job requirements. Just a data point to ponder upon.

reubenharry commented 1 year ago

Good point, I can update that remark to make it clearer, and/or mention Java in addition to / rather than Python. And thanks for your observation! I totally agree that most pythonistas learn it because it is accessible and easy to learn, and I see this as the best thing about Python, and the major reason for its success.

In fact, that is really the motivation for the Haskell Guide; if Haskell was 10 times more accessible and 10 times easier to learn, could we get an influx of smart people in the community that would enrich the ecosystem?

Also, I agree that Haskell is probably always going to be harder to learn than Python (there is no free lunch), but I'm optimistic that it doesn't have to be much harder. Or at least: I think it should be easy for a newcomer to get to the point where they think it is worth spending the effort, and this guide is designed to get people to that point more quickly.