Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 902 Bytes

221020.resolve_class_id_.md

File metadata and controls

12 lines (10 loc) · 902 Bytes

2022-10-22

https://discordapp.com/channels/918498540232253480/918498540232253483/1032674659105243136

erikcorry

A little tip:
Sometimes you print an object to see what it is, and you get "An object with class-id 42", and you wonder what type it has.
Instead you can write object as Null_, and you get a sensible error message: As check failed: a DetachedSocket_ is not a Null_.
Unless it was null, of course.
Which the only instance of the Null_ class.
I am thinking about how to get this to work in a nicer way. The reason is that we don't have the class names (or the method names) on the device. We want to save space there. Failed as lines get decoded server-side so you get the actual class name. We don't do that for "failed" calls to stringify yet, so there we just get the stupid object with class-id nn message instead.
In the mean time object as Null_ is a work-around