On Tue, Jun 05, 2001 at 08:24:31AM -0700, Daniel S. Wilkerson wrote:
> But in the end, I'm most concerned that my code is correct.  Having
> the compiler check everything it can possibly check for me is really
> a requirement for that.  Compile time type checking of method
> signatures is really helpful as well.

What you count as Java's greatest strength, I count as Java's greatest
weakness.  You have to remove *alot* of language features to get down
to the point where its predictable at compile time.

No subroutine refs.  No dynamic inheritance.  No autoloading.  No
dynamic method calls.  No symbol table manipulation.  No eval.  No
automatic method generation.  (That's off the top of my head).

Every class in the hierarchy has to be defined and loaded completely
at compile time (well, at least their method signatures) and defined
strictly.  If there's a class which isn't strictly defined anywhere in
your hierarchy, no go.

Also, since you're doing so much more work at compile time, any
strictly typed code will probably have to be pre-compiled or else be
sluggish to startup (this is just a guess).


An optional strict typing system would be nice, but I just want you to
be aware how difficult it will be to do right, and what you give up by
using it.  This isn't just a "let's toss this in" sort of feature.


As an interesting side-note, there are functional languages out there
which do strict type checking *without* you having to explicitly
declare the types of everything.  I'm fuzzy on the details... I
believe its called "Implicit Typing", ML and CAML do it.

Anyhow, might be interesting to look into.  A typing system that just
works without you really having to do anything would be very Perlish.
Of course, it probably only works with strict functional languages,
which is very unPerlish.


> It got to the point in Java that I would sometimes check in my code
> without even testing it I was so sure it was correct.  I can't
> imagine ever saying that about Perl.

I can't imagine ever saying that about any language!  Type checking is
nice, but its just one class of error-checking.  Doesn't do squat for
basic logic errors, for example.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
Death follows me like a wee followey thing.
        -- Quakeman

Reply via email to