Skip to content
loading...

re: Something I've come to appreciate about dynamic typing VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Could this be handled with even more types?
 

Ooh, I'm not sure. Basically having an enum type for the properties of the object?

I guess that could probably work. Most languages I've seen with static typing don't have a syntax for accessing a struct field with a variable, rather than the literal field name, but I'd like to see one that does.

 

In java, you can pass the field similar like javascript though it static type

 

I agree, this ain't a normal types thing, but I think it can be done (Rust? C++?) and I will probably waste time on this.

code of conduct - report abuse