Follow

Actual complaint about : you can't typecast classes.

That is, you can't treat an object of Class1 as being an object of Class2 (so as to have access to additional/different functions (methods) for handling its data)...

...even if Class2 is a descendant of Class1.

...unless that has changed since the last time I tried it.

· · Web · 1 · 0 · 0

@woozle it won't change because there's only the Object type. You can hack this, though.

@oreolek I've settled for just copying the data over to a new object... but I do miss the class-casting in C++ and (I think) Object Pascal.

Sign in to participate in the conversation
Toot.Cat

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!