Message from JavaScript discussions

October 2020

— The point is that you don't have to remember or think about what the shape of objects are, because the type system has figured it out for you and displayed it for you, it's not about the dropdown, it's about replacing your assumptions with guarantees

Message permanent page

— 

The only way to guarantee the shape of an object in normal JS code is to run it and log it, which might take much longer depending on the circumstances and lifecycle of your object

— And the shape might even change throughout the lifecycle of the object

— Still, you didn't bring the example

— This is the example

— How do you KNOW what the type of foo.bar.poop is in normal JS?

— In a complex app which might mutate the object many times

— The keyword is "you dont... think"🤤 i'll beat you with your own language

— You don't want to "think", you want to "know"

— For sure

— I want some tea.. still, everything is determinable

— {
foo: Math.random() < 0.5 ? 4 : 'hello'
}