Redo ALL the damn types
See original GitHub issueThe types in this have become a giant mess. They’ve evolved as much as they can without a major rewrite. So it’s time for a major redesign of the types.
Problems
- Many types describe JS directly with ops added via implicits. Certain typically-simple functionality like mapping P, mapping S, CB vs direct, etc require so much annoying machinery (
CompState
) or just can’t be done (BackendScopeMP
). - Similarly, React rules are encoded in types by conjunction.
A with B with C
which makes general abstraction and mapping in pain when possible and impossible other times. - Organisation is terrible as it’s either dump heaps in
package.scala
or add boilerplate everywhere likeMonocleReact
andScalazReact
. Yuk. [P, S, B, N <: TopNode]
= pain in the ass.- Too hard now to use types to prevent/allow
.props.children
.
Solution Ideas
- Just wrap all the bloody JS crap in Scala. One extra object instance per component (hopefully) isn’t going to make a noticeable dent in performance.
- Would be great to have a single class for components’
this
and then have capabilities encoded as implicit permissions, phantom types, etc. The class could have all possible ops all the time (like in JS) but the permissions could be required to invoke them. - Use existential types for backend and node type (and props children probably) with a few ∀
Aux
helpers. Library provides in full. Gen code will mostly only specify[P, S]
.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:11
- Comments:33 (19 by maintainers)
Top Results From Across the Web
Re: Zero Opening 1 "Redo" - Damn Copyright
Stream Re: Zero Opening 1 "Redo" by Damn Copyright on desktop and mobile. Play over 265 million tracks for free on SoundCloud.
Read more >The Redo All Vinyl Party- twitch,tv.theredoohio
We are broadcasting live from Rich Street records. This is like the best place for us to do this. surrounded by vinyl. None...
Read more >Lyrics: Re: Zero Op Redo Konomi Suzuki
I am trapped, dealing with my own damn past. I'm getting. Lost on this road of illusions and what once was. I am...
Read more >Pin on Instagram memories
Should I put the Mandala type of circles on the 4 corners again or not? ... got splatter all over it, and I...
Read more >ArchiCAD Basics: Undo and Redo
Undo Undo ……damn it that was 22 steps ago. Real pain I'm sure we have all had that at sometime. Thanks Jared.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ikamthania An update: I was hoping to get an RC out last week but 1) there were more changes still to make that I thought, and 2) being a new parent is significantly eating into my dev time 😦
An RC will be out sometime within the next 7 days.
@ikamthania I can do you one better: progress is going well so I expect to publish RC1 later this week. 😃