[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Cratera - a games-oriented Lua fork
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 12 Sep 2017 14:05:48 +0200
On Tue, Sep 12, 2017 at 1:11 PM, Soni L. <firstname.lastname@example.org> wrote:
> In fact you can't even dynamically (using reflection/code that's not aware
> of the traits/types) "DOWNcast" Foo into Trait! If you're not aware of Trait
> (if you don't explicitly check for Trait), then the compiler won't emit
> *any* code for Trait!
This is fair enough! All the type information is erased.
> You also can't add and remove traits at *runtime*. Among other things.
Ah, I see where your definitions come from - PoV dynamically typed
languages, where any value carries its full time around.
The nice thing about the static approach is that your surprises happen
when you're typing, not when you're running ;)