Closed jvasileff closed 8 years ago
I thought this was a copy&paste/DRY inconvenience, but it's actually bug-like—there's no way to have a two-or-more-backend module.
No for now you can only have one backend per declaration or per module. You can easily make a copy, not nice but certainly not a bug either.
You can easily make a copy
How? I mean, I'm not arguing for any particular prioritization, but I don't see how this is possible.
Just like it is now: you either have a module that works for all backends, or you make a module that works only for a single backend, which would mean that if the JS and the Dart backend code is really the same there's no other way right now than making a copy of the JS module and marking it Dart.
Ok, this is now "unofficially" implemented. Unofficially because it's not a supported feature for 1.2.
Still needs tests too.
The syntax is like this native("jvm", "js", "dart")
Very cool!
I'll consider this closed. Any problems can be put in new issues.
Wrong repo, man.
Heh
Basically, make
native
variadic. This matters when there are three or more backends, since some "native" implementations may be suitable for multiple backends. For example, the Javascript implementation ofContextual
can also be used for Dart.