[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Type-checking trick
- From: Reuben Thomas <rrt@...>
- Date: Thu, 25 Jul 2002 17:24:22 +0100 (BST)
> You type checking solution is clever, but I'm not sure it will solve the
> problem you want to solve. The difference between what you're doing here
> and what C or Java does when it type checks is *when* the type check
> happens. In C and Java a type error is found at compile time, in your
> program it's found at run time.
You're right, it's not as good, but it's an improvement. Dynamic checks
are what you get in Python and (sometimes, if you're typecasing) in Java.
Kleineken: refreshes the dimensions other beers cannot reach