3 ms·
> I often wonder if the whole idea of "typing" is the wrong decision in language design, if we shouldn't come up with something better. Not sure what you mean
by naasking 11y ago
> I often wonder if the whole idea of "typing" is the wrong decision in language design, if we shouldn't come up with something better.
Not sure what you mean by "better". A "type" is a proposition about the program. You can't get more general than that. Any static checking system will have an interpretation in terms of types, so it's hard to see what could possibly be better than a type system. There are just different type systems with different properties.
- hellofunk 11y agoWell there is also a fair amount of supportive opinion on the contrary, that "better" is a system without types altogether, hence dynamic languages.
- PicassoCT 11y agotype-safety allows for the generating of far more efficient machine code. And you type your language everywhere, the difference is the time it happens and the consistency of the rules below handling type-conversions. lua sets the type depending on the value assigned at run-time. There are a lot of non-dynamic lanugages who pretend to have dynamic types (var)but actually just let the compiler deduce at compile time the assigned valuetype