lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>>> I think it's a bad idea to have type information that isn't
>>>> enforced.
>>> The idea is not not to enforce them.  The idea is that you can have
>>> a dynamic language with statically checked types.
>> Sooner or later something will be changed and the dynamic type won't
>> match the static annotation.  Without enforcement, there's no easy
>> way to catch this.
> Of course there is an easy way to catch it: run the type checker.

If the type checker is static, not at run time, there are lots of type
errors it can't catch.  Determining whether a given variable ever takes
on a value of a given type is at least as hard as the halting problem,
after all.

If the type checker is dynamic, at run time, then there _is_
enforcement, and what I said doesn't apply.  "[T]he actual
implementation just ignores it" led me to think it was being, well,
ignored.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse@rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B