Comments (8)
@lastland yes, it's not yet automated. To be honest, seeing all the bugs MiniboxedFunction
s triggered, I think it's best if we leave it that way. Do you think it's too difficult to make the replacements by hand?
Or, maybe, would putting the classes in the scala
package directly make it easier?
from miniboxing-plugin.
I don't think that it would be more difficult than adding @miniboxed
s by hand, but this could not be automated by using the minibox:mark-all
compiler option, right?
from miniboxing-plugin.
No, it can't be automated. Now I'm see what you mean, the different transformations are inconsistent:
@miniboxed
annotations need to be introduced by hand, but can be automated via-P:minibox:mark-all
Numeric
and the other type classes have to be introduced by hand, but can't be automated via-P:minibox:mark-all
Tuple
accessors andFunction
s are automatically converted, and can only be turned off using-P:minibox:off
.
I agree this causes confusion. What do you think would be a good approach?
from miniboxing-plugin.
I imagine it could all start from the @miniboxed
annotation:
Numeric
and other type classes are replaced automatically byMiniboxedNumeric
and co.Functions
are replaced when their type arguments are marked as@miniboxed
Tuple
accessors are replaced when the two components are marked as@miniboxed
Then, if you don't add any @miniboxed
annotation, nothing is changed. If you do, either manually or via -P:minibox:mark-all
everything is consistently changed.
What do you think?
from miniboxing-plugin.
I agree. It feels most natural from a user's perspective (well, from my perspective
from miniboxing-plugin.
Thanks @lastland!
How would you feel about moving this to the next milestone? I don't think that I'm able to pull it off quickly and I really want to get to the 0.4 release out the door.
from miniboxing-plugin.
Of course. No worries.
from miniboxing-plugin.
Cool, thanks @lastland! I will update the behavior for the next milestone. In the meantime, if you notice any strange behavior/need help getting the miniboxing plugin to do what you want, ask on gitter anytime.
from miniboxing-plugin.
Related Issues (20)
- VarArgs transformation error
- Wrong Least Square Linear Regression benchmark for RRBVector HOT 4
- (new Array[AnyRef](5)).asInstanceOf[Array[T]] warning HOT 1
- @specialized code reports type mismatch in the presence of miniboxing but succeeds with -P:minibox:mark-all HOT 1
- Slowdown for pattern matching code HOT 1
- new Array[AnyRef](...).asInstanceOf[Array[T]] not supported
- -P:minibox:off and MiniboxedNumeric HOT 1
- Clean up miniboxing.runtime.math HOT 1
- Multiple annotations found for function HOT 5
- Build script: flexible dependency
- Inner classes type param warnings: only when type params are there
- Incorrect translation HOT 2
- Array translation issue:
- Upgrade Scala to 2.10.6 HOT 5
- AbstractMethodError due to bridge removal (again) HOT 6
- Infos shown for each compilation unit
- Support for self-types
- Crash on specialization interop
- Clarify project status on the website and in the repo HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miniboxing-plugin.