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

What about names types? #23

Closed
ccorcos opened this issue Dec 9, 2015 · 4 comments
Closed

What about names types? #23

ccorcos opened this issue Dec 9, 2015 · 4 comments

Comments

@ccorcos
Copy link

ccorcos commented Dec 9, 2015

It seems like names types might be easier to work with.

const Point = Type({Point: {x:Number, y:Number}})

Point.case({
  Point: ({x, y}) => {}
}, point)

When types get more and more complicated it, I'd image it gets pretty hard to keep track of the order of everything. Any reason you decided to stick with arrays? I understand haskell seems to do it that way...

@paldepind
Copy link
Owner

Yes. That is a great idea. Haskell supports it with records.

There was another discussion that among other things was about such a feature. As described here I actually implemented it. I never got it finished up though :(

@ccorcos
Copy link
Author

ccorcos commented Dec 11, 2015

Awesome! 👍

@ccorcos ccorcos closed this as completed Dec 11, 2015
@paldepind
Copy link
Owner

I don't think unfinished unmerged code is particularly awesome ;)

What do you think about the features in the branch? Anything you like or don't like? Anything you'd still be missing? Would you use it? If so I should finish it up, merge it in and do a release.

@ccorcos
Copy link
Author

ccorcos commented Dec 13, 2015

haha. I was just commending the work in progress.

It looks good to me -- I wouldnt worry about enumeration. I'm not using union-type yet, but I'm inspired to from looking at your functional frontend examples. This was the only part holding me back.

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

2 participants