Eiffel better than Python ?

Dublanc, David ddublanc at free.fr
Tue Jul 3 17:32:06 EDT 2001


What is exactly weak typing ? I believed that Python was weak typing !

About Visual Basic : My brother (a VB developer :-) thinks that if you only
develop on MS platform and for MS platform without speed goal, VB is very,
very productive !
(there are for instance a browser of DLL, so system programming is very
easy ).

David


"Alex Martelli" <aleaxit at yahoo.com> a écrit dans le message news:
9hsf0c0210e at enews1.newsguy.com...
> "Tomasz Stochmal" <tom at peresys.co.za> wrote in message
> news:f20ea932.0107030100.6c740683 at posting.google.com...
> > I have read the following book which gives C/C++ heavy bashing
> >
> > http://www.elj.com/cppcv3/
> >
> > Conclusion is to use Java or even better choice is Eiffel
> >
> > Should I stop using Python and jump on Eiffel wagon ?
> >
> > Anybody that tried both languages ?
> >
> > How do they compare ?
>
> Eiffel has reasonably-good strict, compile-time typing.
>
> Python is totally oriented to dynamic, run-time typing
> (often erroneously called "weak typing" -- that is, in
> fact, something else).
>
> So, they don't compare much: they've taken widely
> different language-design choices from way back.  Eiffel
> will do a good job of finding type mismatches at compile
> time (not a perfect one due to the covariance problem),
> Python won't even try and will rather maximize your
> productivity so you can most easily and productively
> develop and run lots and lots of tests (you need to test
> a LOT even in a compile-time-typed language of course,
> but it does occasionally diagnose an error earlier -- in
> exchange, you have to do a lot more work, of course).
>
> If you want a language that's even LESS compromising
> than Eiffel in terms of typing, with *NO* possibility
> whatsoever of a typing-error escaping the compiler,
> try Haskell instead.  It's VERY instructive to become
> productive in Haskell, and it's fun if you do it with
> a book such as Hudak's "The Haskell School of Expression".
>
> Then you can come back to Python with much deeper
> appreciation for the role of immutability, list
> comprehensions, functional programming, type deduction
> by the compiler (Eiffel doesn't do that for you: you
> have to tell the compiler everything -- Haskell is
> designed so the compiler can DEDUCE types on your
> behalf, although you do normally, redundantly, also
> state them "out loud" so the compiler can catch your
> logic mistakes).  When you're back to Python from
> Haskell I suspect you'll miss Haskell's typeclasses,
> such an UTTERLY elegant approach!, and the implied
> lazy-evaluation of everything, perhaps the syntax
> sugar that allows any function to be used as an infix
> operator.  I think you WON'T miss Haskell's "monads",
> a concept so powerful, refined and elegant that its
> full import keeps escaping most of us:-).  In syntax
> sugar terms, Haskell will give you significant whitespace
> use that's not too far from Python, but you'll see lots
> of (well-used) punctuation in lieu of keywords -- not
> a big deal either way, of course.
>
> In the end, I think Python is far more productive
> for all kind of real-world uses, but an apercu on
> statically-type-checked, nothing-is-mutable, lazy-
> everything, &c, IS interesting and instructive.
> Eiffel only does *part* of that for you...
>
>
> Alex
>
>
>





More information about the Python-list mailing list