Closed thomasfanell closed 7 years ago
since it breaks compatibility.
FMI, what's broken with that?
I like how you removed 300 lines from the middle end and it still works :+1:
@vendethiel
All the class extensions have to be changed from extend <Conrete Type>
to extend <T>
. rock can not handle both.
So you're removing specialization from OOC, is that right?
@vendethiel no, not really. You can still extend classes, but only by specifying the concrete type, just like in the official ooc-lang, before our bounty-program.
Okay, it's the opposite : you need to specialize a generic to add behavior.
What was the compatibility issue?
@vendethiel
In rock 1.0.21 (the current version), we extend classes using this syntax: extend Cell<SomeType>
The generic extension bounty would allow us to do this instead: extend Cell<T>
Neat, but it requires all of our current extensions to be updated according to the new syntax and we can no longer test our code base on previous versions of rock. We are not ready to commit to this change at this point in time.
You confirm the fact that extend Cell<Int>
means these fonctions only exist for Cell<Int>
, not for any type T
– like the bounty tries to achieve? I don't see why these should be conflicting features (they're not in, e.g., C++)
Yes, that is correct.
For any technical reasons, you'd have to ask @shamanas. There is some discussion in #44.
Okay. I'd argue this should have been extend <T> Cell<T>
, but ships sail :). There even is discussion about that in #44.
@fredrikbryntesson review this first batch of changes?
NOTE: Removed bounty extend generic classes for now, since it breaks compatibility. It can be found (isolated) in this branch.
Changes
_this
instead ofthis
Updated obfuscatornext batchsuper()
in a shadowed function now cause an error (use--allow-super-when-shadowing
to disable this error)count()
andvalues()
functions for enums