[ruby-talk:00369] Re: type-checking
From:
"Michael Neumann" <neumann@...>
Date:
1999-06-01 18:30:04 UTC
List:
ruby-talk #369
----- Original Message ----- From: GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp> To: ruby-talk ML <ruby-talk@netlab.co.jp> Sent: Tuesday, June 01, 1999 7:05 PM Subject: [ruby-talk:00368] Re: type-checking > But for a local variable, such technic cannot be apply because the > scope of a function is different from a local variable. On the other > hand, the current specification on local variable is agreeable at > least for me because it provides clean scope (except for blocks). And > substitute-protection is done on execution whareas we generally expect > to be done statically. So, I consider Racc's way of type-checking is > not enough for practical use. Yes that's right, Racc don't implement static type-checking. It only implements runtime type-checking for instance variables. I think we don't need type-checking for local variables, because the author of the code knows what types the variables have, and I can't imagine that Ruby will ever have static-type checking. It is very good without! Racc is very useful, not only to make coding easier and safer, but also to help documenting the code a bit more. It is desirable that the code documents itself, like Eiffel do it. But in this aspect Ruby is not yet as far as Eiffel. Michael