question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redo ALL the damn types

See original GitHub issue

The 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 like MonocleReact and ScalazReact. 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:closed
  • Created 8 years ago
  • Reactions:11
  • Comments:33 (19 by maintainers)

github_iconTop GitHub Comments

6reactions
japgollycommented, Mar 1, 2017

@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.

2reactions
japgollycommented, Feb 19, 2017

@ikamthania I can do you one better: progress is going well so I expect to publish RC1 later this week. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found