Open fancellu opened 7 years ago
Huh. That's clever, and rather tempting. I'm probably not going to pick it up, for two reasons:
But I'm going to leave this open here, at least for the time being, so folks can see how to do it if they like. (And we might add it to the documentation for those who are using both libraries.)
Agreed. Its not like its hard to add to own project, just pull in "sourcecode" and use the 2 subclasses.
I know about the new 0.6.14 stuff, but it still looks pretty ugly, especially in 2.11. The builder API is pretty, and now even easier to author with sourcecode.Name
I haven't tried the new stuff in practice yet, so I don't quite have a clear sense of the tradeoffs; my general intuition is that it's less boilerplate per-interface; slightly more per-entry-point; and more consistent with the rest of the Scala.js system. I'll at least be pointing it out as an alternative for folks to consider; I'll decide whether to formally deprecate JSOptionBuilder after I've tried the new stuff on a few APIs myself.
You mentioned this in the TODO
Done it with
https://github.com/lihaoyi/sourcecode
e.g.