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

Tutorial on using union-types #33

Open
jethrolarson opened this issue Mar 8, 2016 · 3 comments
Open

Tutorial on using union-types #33

jethrolarson opened this issue Mar 8, 2016 · 3 comments

Comments

@jethrolarson
Copy link
Contributor

I think there's a lack of info on how to actually apply union types to real problems in js.

I'd like to see something like http://fsharpforfunandprofit.com/series/designing-with-types.html
offered somewhere. I understand if you want that outside the scope of this repo, but I thought I'd open an issue incase you want to make it a wiki or something.

I'd be interested in contributing here.

@ericgj
Copy link

ericgj commented Mar 8, 2016

I agree, great idea. Quite a few of the examples in functional-frontend-architecture use this library. Granted, they are pretty narrowly focused on modelling actions in the Elm architecture sense, and they don't demonstrate the new features of union-type. But that may be a place to collect some examples.

I have a few half-baked projects which use union-type outside of the Elm architecture, I can't say they are more than getting my feet wet, but they may be useful to look at.

@paldepind
Copy link
Owner

I agree with this as well. Just having such a library is one thing. But figuring out how best to use it is probably not easy unless one has experience in a language with algebraic data types. A tutorial would be a great idea.

@kwijibo
Copy link

kwijibo commented Mar 14, 2016

+1 The FSharp blog was also what got me interested in this style of programming, and while I've managed to find this library very useful, my understanding of (functional) type-based design is inferred too much from current capabilities of union-type (rather than general principles). So I'm sometimes not sure what the most idiomatic way to use it is, or if a feature I'd like to see would be an appropriate addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants