The State of PureScript Survey 2023 - The Results Are In!

The PureScript 2023 Survey

The results are in! PureScript’s second annual survey revealed some key trends about the language and the broader context of functional programming. You can download the full results here, and you can read on to see the core team’s high-level analysis of these results.

Tooling

Last year, tooling was a major concern of folks that had stopped using or had never used PureScript.

In the past year, the following improvements in tooling were made:

  • The new registry (currently in alpha) automates and streamlines the package management process.
  • The spago rewrite is in active development and nearing an alpha release (though some are already using it). It avoids several pitfalls of the previous Haskell-based spago, adds support for some highly-requested features, and hopes to garner more contributions in the future by being written in PureScript.
  • The purs-backend-es tool outputs JavaScript that is more readable and has significantly faster execution than the JavaScript outputted by the PureScript compiler.

The concern about tooling has gone down on-average by 8%, likely due to some of the improvements above. Here’s the 2023 response for those who are no longer using PureScript:

And here’s the same response by those who have not used PureScript:

Documentation

Like last year, folks identified documentation as an impediment to using the language. For those who have never used the language, it is still the biggest barrier to entry.

The qualitative responses about documentation revealed three clear areas where there is room for improvement:

  • a desire to see more up-to-date official documentation.
  • confusion about how to get up and running on a project of type X given experience with Y.
  • frustration with a lack of clarity around tooling - while tooling has improved, there is still a lot of it out there, and it’s not clear when certain legacy tooling will be deprecated.

The quantitative answers show that free learning resources (e.g. PureScript by Example, Jordan’s PureScript Reference, and various framework documention (likely Halogen or something similiar)) are used more often than paid ones (e.g. Functional Programming Made Easier).

Unfortunately, the survey didn’t ask additional questions like

  • How helpful was each resource?
  • At what point did you start/stop using a given resource?

PureScript by Example is the learning resource officially promoted on the PureScript webpage. However, it does not currently have a person maintaining and improving it, and there are definitely places where it is no longer up-to-date. It might be time to feature something else in its place, such as Functional Programming Made Easier because the other top resource, Jordan’s PureScript Reference, is more of a reference and less of a step-by-step learning guide.

63% of respondents identified that written material is important in their learning journey, so it would make sense to align the materials we promote with the ones that the community finds most useful. However, it’s also clear that participating in online communities, building applications and reading through source code are meaningful learning pathways for folks working with PureScript.

Because our documentation isn’t as strong as it could be, it’s likely that folks who are currently proficient with the language got there by being auto-didactic, so we can’t necessarily draw the conclusion that the 2023 figures would stay the same if we had stronger documentation. That being said, the focus on learning from building applications aligns with another strong trend we identified: a desire to see more large-scale PureScript production deployments.

Production deployments

Several data points have led us to the conclusion that a dearth of PureScript production deployments is the largest concern of both those inside the community and those who have left the community:

  • 56% of folks that have stopped using PureScript identify the lack of large companies using PureScript in production as the most urgent issue we’re facing: a whopping 22% higher than the next-highest concern.
  • when asked “What are your biggest worries for the future of PureScript?”, 70% of current PureScript developers identified “Not enough usage in industry” as the biggest concern, dwarfing the next response by 25 percentage points.
  • only 18% of respondents that use PureScript regularly work in companies that are planning on hiring PureScript developers.
  • 25% of respondents strongly disagree with the statement “It is easy for qualified applicants to find jobs which use PureScript for the majority of programming.”

At the same time, for those using PureScript in industry, 42% responded that their company uses PureScript for a large portion of their production projects. So while significant production deployments do exist, they are either not well-known enough or not numerous enough to assuage folks’ concerns about a lack of production deployments, and they are not large enough to sustain a robust PureScript-development job market.

Unlike documentation, PureScript’s usage in industry is difficult to directly influence in the short term. In the long-term, investments in better tooling and documentation all translate to more production deployments, but we do not yet see a clear path towards improving the PureScript-in-industry situation during 2023. What we can do is identify opportunities to more prominently feature companies using PureScript.

For example, PureScript’s new es-backend was created by developers at Arista NDR specifically to aid with their production stack. Other companies have made similar contributions to PureScript’s backend ecosystem, such as id3as via the purerl backend for Erlang and Meeshkan via the purescript-python backend for Python. While the purescm backend has not yet been used in production, it has improved significantly in recent months, and it will be insteresting to see if it matures to the point where it can be used in industrial stacks. We look forward to making those connections more evident through our official materials.

PureScript Developers :heart: PureScript

Like last year, we saw strong signals that those using PureScript love using PureScript.

  • 97% of those using PureScript agree with the statement “PureScript is fun to use.”
  • 97% of those using PureScript agree with the statement “PureScript provides a real benefit over other programming languages.”
  • 75% of those using PureScript agree with the statement “PureScript makes me more productive.”
  • 84% of those using PureScript agree with the statement “PureScript code tends to contain significantly fewer bugs than equivalent code written in another programming language.”

Furthermore, the vast majority of PureScript developers feel welcome on our main community channels.

So while there are short-term concerns about documentation and long-term concerns about industry adoption that we’ll need to address as a community, it’s important to acknowledge that PureScripters have a great thing going with the language as it currently stands.

Conclusion

While PureScript’s 2023 survey followed the general contours of the 2022 survey, it’s clear that the improvements in tooling moved the needle in the 2023 responses. We hope that we can be as intentional and impactful as we look to translate this year’s results into actionable items.

If you haven’t used PureScript yet or are discovering PureScript for the first time, you’re more than welcome to say hi on our Discord, read about someone’s learning journey, or read a framework’s tutorial. Only a handful of programming languages are as loved by their community as PureScript is, so we’re excited to share the good vibes with eager and curious minds. Rendez-vous in 2024 for the next survey and, until then, we look forward to seeing exciting applications and novel ideas continue to emerge from our awesome community!

22 Likes

edit: I rudely forgot to say thank you for taking the time and effort to make this survey a reality, it’s really interesting and is (FWIW, IMO) a very valuable thing for the PureScript project to have. So, thank you!

In the long-term, investments in better tooling and documentation all translate to more production deployments, but we do not yet see a clear path towards improving the PureScript-in-industry situation during 2023.

I think this is the heart of the issue, building better tooling and documentation will open the language to more people. When/if interest builds to a critical mass, it’ll take off.

Unfortunately, we’re up against TypeScript, which has excellent tooling. However, TypeScript is a mediocre language and tooling can be fixed.

I wish I had time to help with PS tooling, but it’s not my area, and I have some plans for helping out in places that are my area. However, as someone who’s been working in both TS and PS full-time for the last year, I can advise exactly where the PS tooling is lacking and why (and I know a couple of other devs in a similar place). If that helps, please let me know! However, I’m expecting the problem isn’t a lack of understanding of the problem, it’s time, effort, and money that’s holding the tooling back.

7 Likes

This can definitely be helpful in terms of stressing the problem. I believe the problem is not just lacking resources or understanding, but the direction and organization as well.

1 Like

Can you elaborate on this? Which kind of stuff do you miss from the tooling in PureScript?

I’ll comment a bit. I’ve been wanting to get back to Purescript. Around 2019-20 I wrote a website in Purescript that was quite big, had lots of functionality, at least for me, a Purescript newb. It was a wonderful experience. Since then I’ve barely had to touch it but I’m at the stage now where I need to start update it again and I also want to build more of my own personal websites using Purescript.
I’m feeling there is a bit of a disconnect between newer and older versions. I could update to 0.14.x and still be able to use most, if not all libraries I used in 0.13.x. However I would love to stay up to date and use 0.15.x now that it has ES modules. Also just to stay up to date with the latest developments.
But this requires me to write my own code for some of the functionality I was using from other libraries. For example, formless and select are in 0.14 but not 0.15.

What I’ve been thinking about doing is simply fill in the blanks that I need for 0.15. Figure out how I can make a Halogen component to create and validate forms and same for select. To my surprise I found a apexchart library for 0.15 which is something I need. But I think these are some of the points that people hit. Both if they are new and also if they are in a limbo between 0.13, 0.14, 0.15.

I don’t understand the comment about lack of tooling. I find the tooling extremely good now. I just installed new spago and the merge of the configs makes perfect sense to me. Adding package sets by referencing registry is much easier. I also noticed this package purs-nix that helps people setup purescript projects with nix and flakes. Building the code and transpiling it has become way easier imo.

Coming back to Purescript I thought it was maybe slowing down. I see the reddit is less active then before, although that’s kind of always been the case. But to my surprise there is still a lot of development going on, a lot of people staying up to date with the new version etc.
I’m very impressed by this and want to thank all of you for your good work :smiling_face:

4 Likes

Just FYI, Formless is available for 0.15 (and is in the latest package sets)!

3 Likes

Thank you @thomashoneyman and btw not putting your libraries on the spot here. I just use them in many of my projects since they’re awesome and easy to use for an important functionality so they are usually what I start with when moving over. I completely missed that it was in.
It seems for my use case, a halogen web with API connection etc is very much doable with 0.15.x.

1 Like

Oh, no worries, I didn’t feel on the spot! I just wanted you to know they indeed do work on 0.15, and I think 0.15 is well-worth switching to. Such a nice experience with ES modules and the results you can get from purescript-optimizer are crazy good.

3 Likes