magic-lang / rock

ooc compiler written in ooc
http://ooc-lang.org/
MIT License
14 stars 4 forks source link

rock 1.0.22 - batch one #74

Closed thomasfanell closed 7 years ago

thomasfanell commented 7 years ago

NOTE: Removed bounty extend generic classes for now, since it breaks compatibility. It can be found (isolated) in this branch.

Changes

vendethiel commented 7 years ago

since it breaks compatibility.

FMI, what's broken with that?

ghost commented 7 years ago

I like how you removed 300 lines from the middle end and it still works :+1:

thomasfanell commented 7 years ago

@vendethiel All the class extensions have to be changed from extend <Conrete Type> to extend <T>. rock can not handle both.

vendethiel commented 7 years ago

So you're removing specialization from OOC, is that right?

thomasfanell commented 7 years ago

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

vendethiel commented 7 years ago

Okay, it's the opposite : you need to specialize a generic to add behavior.

What was the compatibility issue?

thomasfanell commented 7 years ago

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

vendethiel commented 7 years ago

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++)

thomasfanell commented 7 years ago

Yes, that is correct.

For any technical reasons, you'd have to ask @shamanas. There is some discussion in #44.

vendethiel commented 7 years ago

Okay. I'd argue this should have been extend <T> Cell<T>, but ships sail :). There even is discussion about that in #44.

thomasfanell commented 7 years ago

@fredrikbryntesson review this first batch of changes?