Re:Ravi – Lua 5.3 with optional static typing
by PicassoCT on Sunday October 18, 2015 @08:38AM
(#10408056)
type-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
Re:Ravi – Lua 5.3 with optional static typing
by hellofunk on Saturday October 17, 2015 @05:15PM
(#10406143)
Well there is also a fair amount of supportive opinion on the contrary, that "better" is a system without types altogether, hence dynamic languages.
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.