Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating introduction, mostly links, see #173 #193

Merged
merged 2 commits into from
Jul 15, 2023
Merged

updating introduction, mostly links, see #173 #193

merged 2 commits into from
Jul 15, 2023

Conversation

othelarian
Copy link

Updating links for purescript, purescript-node and purescript-contrib, adding lodash, ramda and fp-ts, and wrote some lines about TypeScript and Elm.

We could also possibly give a whirlwind tour of some of the advanced type features (targeting Haskell, Elm, and TypeScript users) with a disclaimer not to worry if the section may be confusing, since it will all be addressed in the upcoming chapters.

I avoided talking about type features in detail, because I'm not comfortable enough with this subject, and I think, as a newcomer, it'll be a bit confusing talking about something too advanced in the introduction, but it's just my point of view.

@milesfrain
Copy link
Member

Thanks for working on this. That intro is really dated.

I'm thinking it may be better to move language comparisons to the docs repo. Here's a planning issue for that. purescript/documentation#334

So then this section could just mention the following:

  • There are benefits to pure functional programming.
    • Describe benefits or link to another explanation.
  • Functional JS:
    • JS was originally missing many FP features (map, filter, reduce, etc.).
      • Underscore, and then Lodash addressed this need.
      • Some of these features were then added in ES5.
    • JS is still missing currying and immutability.
    • JS lacks Maybe and Either types.
      • Sanctuary and Folktale add these. Sanctuary also enables runtime type checking for dev builds.
  • There are benefits to static (compile-time) type checking.
    • Describe benefits or link to another explanation.
    • TypeScript adds type checking to JS.
      • fp-ts adds type-checked abstractions based on Haskell's type classes. This is more verbose than PureScript.
  • Link to detailed language comparison page.
  • PS can target more backends than just JS, but this guide will just focus on targeting web browser and node.js environments.

So for steps moving forward, I think it would be best to start with deleting the clearly dated content in the intro, then work on a replacement. These can be separate commits, where the intro will be a lot more concise in the interim.

@Zelenya
Copy link

Zelenya commented Jul 15, 2023

Added a note about other backends.

I'm unsure if adding comparisons to short-lived js libraries is useful. Saying that PureScript has Either, currying, and others has zero (or even negative) value to a person who hasn't used it before and doesn't know what problems they solve. They need to read at least a whole chapter for each topic to understand (or even to start thinking about) their value. Having too many unknown words in the intro can be discouraging for some.

Comparison to Elm, TypeScript, and other friends is a bigger topic and still an open issue.

@Zelenya Zelenya merged commit 8bcd61e into purescript-contrib:master Jul 15, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants