r/purescript • u/Exact_Ordinary_9887 • Jul 17 '25
Is it worth learning PureScript? So far the experience was less than ideal.
I am not a Java or SQL programmer, but I was able to quickly get up and going. The error messages made sense. The documentation had plenty of excellent examples.
Here you get confusing type errors. Some examples on the web appear to be broken on purpose, so they are useless. Type signatures are not examples. There is very little traffic on the discourse. Copilot gives nonsense answers and even contradicts itself.
So, I am asking, is there a light at the end of the tunnel? How did you get over the inability to write a simple variant of a simple project?
Was it worth to persist and why?
View all comments
Show parent comment
1
u/GetContented Jul 17 '25
I almost asked if you knew you had to install libraries. :) Glad you figured that out. Thanks for sharing the error!
So check in Web.DOM's API that querySelector is there, then. That's straightfoward isn't it? I'm assuming you know pursuit if you've read the book you mentioned. Or at least the basics of that book, or if you've read the intro to purescript.
To do this, go into pursuit, then search for querySelector, then look for the one that matches the right capitalisation, then notice that it's moved into a different sub module. Change it and save/recompile.
I would be careful expecting everything to be easy if you don't learn the basics. It's absolutely not. It'll burn you and you won't want to continue. Please don't do that! This is one of the most joyous FE programming experiences there is, so long as you upgrade your understanding to a certain level. It can certainly be frustrating at times because there are a few weird edges, but learning the basics pretty much solves most of them.