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 ?
Well, the good news is C and C++ both deserve heavy bashing. Then
again, so does Java, so does Ada95, so does Eiffel. If I had a nickel
for every time I've seen someone say "solve the software crisis--ship
things on time, make reliable software, etc.--just by using Foo
language", well, I'd be sipping mai-tais on a South Pacific beach
instead of posting to USENET.
> Should I stop using Python and jump on Eiffel wagon ?
Do you *like* Python?
If so, then keep using it.
If you don't, then find a language you like.
It really is that simple. :)
You're lucky you didn't read a book that told you jumping in the river was a
good thing, otherwise you'd be pretty wet by now...
Seriously. You have to use your own judgment on these matters. Clearly there
are things "wrong" with every programming language. It's a matter of which
suits your purposes best.
Alternatively: "Yes, Eiffel is much better than anything else. Especially
for air traffic control systems" :-)
regards
Steve
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
I wonder if the annual Dataquest language survey, if it still exists,
that showed that more "programmers" used Basic in it's various flavors
then all other languages combined still shows that... hmm, is that a
reason to use Basic? After all, supposedly 80% of all business apps are
written in Basic - presumably Visual Basick since they've pretty
effectively killed off that entire market segment. Personally, I think
i'd rather take up a career as William Park ;)
Dave LeBlanc
> I wonder if the annual Dataquest language survey, if it still exists,
> that showed that more "programmers" used Basic in it's various flavors
> then all other languages combined still shows that... hmm, is that a
> reason to use Basic? After all, supposedly 80% of all business apps are
> written in Basic - presumably Visual Basick since they've pretty
> effectively killed off that entire market segment. Personally, I think
> i'd rather take up a career as William Park ;)
>
> Dave LeBlanc
One or another form of Business Basic I'd expect. They've pretty well all
grown GUI appendages now.
--
Emile van Sebille
em...@fenx.com
---------
Regards
Franz
P.S.:
I know that your bag of tools contain at least Python, (MSV)C++, MSVB, and
Haskell. Curious again: How do you use your bag of tools?
"Alex Martelli" <ale...@yahoo.com> wrote in message
news:9hsf0...@enews1.newsguy.com...
I bet he uses Haskell to write Usenet posting-bots. ;-)
--
Ng Pheng Siong <ng...@post1.com> * http://www.post1.com/home/ngps
Quidquid latine dictum sit, altum viditur.
http://dqweek.ciol.com/content/search/showarticle.asp?artid=16199
(I can't find their 2001 survey) but the emergence of Visual Basic
in the top spot is pretty recent there, and now threatened:
2000 Visual Basic
1999 Visual Basic
1998 Visual Basic
1997 PowerBuilder
1996 PowerBuilder
1995 Borland C++
1994 Borland C++
1993 Turbo Analyst
1992 Turbo Analyst
1991 TurboAnalyst/Borland C++
1990 COBOL Level II/MS COBOL
1989 COBOL Level III
Their "UPIs" for the year 2000 are:
Visual Basic 100
Oracle 76
Java 66
Borland Delphi 34
Visual C++ 28
but I'm not sure what that measures exactly.
"""
Interestingly, current usage was reported the highest
for Java, followed by Visual Basic. Visual Basic doesn’t
have the huge lead that it had last year. The UPI of Oracle
and Java has increased manifold. So for now, all eyes are
on Oracle and Java as the preferred development tools next
year.
"""
Alex
Eiffel is one of the "purest" practical programming languages (PPPL's
:-) ) I've seen. But for some reason its popularity is lagging far
behing Java, Python etc.
--
Vriendelijke groet,
René Pijlman <rpij...@spamcop.net>
Wat wil jij leren?
http://www.leren.nl/
If C had been recently invented, it would deserve *some* bashing. But for
something invented 30 years ago, it deserves no bashing. It was an excellent
portable language for machines of that era. And in the hands of a competent
programmer it is still an excellent tool.
As for C++, that deserves a moderate amount of bashing.
But opinions are like nipples: most everyone has some.
The conclusions of those who prefer Java over C++ should not be taken
seriously.
--
Rainer Deyke (ro...@rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
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" <ale...@yahoo.com> a écrit dans le message news:
9hsf0...@enews1.newsguy.com...
perl -e "print '1' + '1'"
perl -e "print 1 . 1"
--
--- Aahz <*> (Copyright 2001 by aa...@pobox.com)
Hugs and backrubs -- I break Rule 6 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista
"I'm not tense, i'm just terribly, terribly alert" --unknown
Never used it "in anger" (i.e. either for $$ gain, or [successfully] for
research into contract bridge, my One True Love:-). Just played
around with various FP toys in fascination, emerging with a strong
impression that Haskell is far and away the most elegant one (not
necessarily "most practical" or "most powerful" -- haven't looked
into O'Haskell, and did TRY to grasp O'Caml but I can't see the
elegance or whatever... seems as accretion-laden as C++ to me).
> I know that your bag of tools contain at least Python, (MSV)C++, MSVB, and
> Haskell. Curious again: How do you use your bag of tools?
C++ (currently in the MSV incarnation) pays my rent (and much
besides) since it's the main development language at the SW
house I work for (think3, inc) and internal teaching & consulting
on C++ (and other technological issues -- COM & related ones
first and foremost, &c) is among my main roles as Senior SW
Consultant there. VB is starting to see growing use in ancillary
roles (and some customer-delivered software, e.g. the integration
of our PDM tool with Autocad uses the latter's built-in VBA and
related Automation Object Model). Python is what I use and
suggest every time I get a chance and it's starting to replace
Perl internally in system administration tools, testing setups,
and general scripting (but not in customer-delivered SW, so
far). Python is also what I use (together with some C++ COMponents
& Boost Python-extensions for speed) in my contract-bridge research
now (having entirely rewritten the mixture of Perl, C and custom
ad hoc languages I had ended up with over the years).
I'm not currently coding in Haskell (pity) or other languages
I know. Except for a little Javascript (as little as I can get
away with -- oh how I *DETEST* the beast!) in Dynamic
HTML pages I have to write sometime...
Alex
Python has dynamic typing, but it's far from weak: it won't turn
int into string, or viceversa, for example, unless you tell it
explicitly. Perl's penchant for turning numbers into strings and
VV is a good example of 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 !
Apparently Microsoft disagrees from your brother;-), since in the
next release they're making many incompatible changes to the VB
language (almost every one of which, funny enough, takes it closer
to Pyton -- though not quite close enough:-).
> (there are for instance a browser of DLL, so system programming is very
> easy ).
The impressive array of tools that comes with VB _almost_ (but not
quite) makes up for the language deficiencies, which are many (they
will be fewer in next release, since MS is removing some of the most
glaring ones, like the Set vs Let distinction in assignments, the
related concept of 'default attribute' of an object, etc, etc). In a sense
the situation is close to Java (though Java as a language has fewer
warts than VB, and it ain't so much the tools but the libraries and
frameworks:-). Into both niches Python fits just great -- you get
to keep using the same libraries and some of the tools AND at the
same time you code in a sane language....!-)
Alex
Weak typing is what the shell or perl do : anything can be used
anywhere and it only has the type "variable" (or whatever you want to
call it). Something like the following :
#!/usr/bin/perl
print 2 + "1" ;
print 2 + "1a" ;
print "1" + "2" ;
print "1a" + "2" ;
print "1" + 2 ;
print "1a" + 2 ;
What you get is an interesting auto-coercion between strings and
integers because there is no difference, as far as perl is concerned.
Some of those, in Python, would be type errors :
>>> print 2 + "1"
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand types for +
>>>
The closest thing that might work in Python would be
>>> print 2 + int( "1" )
3
>>>
but it doesn't always work (as it does in Perl) :
>>> print 2 + int( "1a" )
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: invalid literal for int(): 1a
>>>
Another indication that perl has weak typing is the following behavior :
$ perl
print $undefined_variable_name + 10 ;
10
$
In perl if a variable doesn't exist, and it is used in numerical
context it is treated as 0, or as the empty string if used in string
context. In Python that would raise a NameError exception.
| I believed that Python was weak typing !
As you can see above, Python actually checks the types to ensure that
they are sane for the given operation. It checks them _dynamically_
(at run time) as opposed to statically (at compile time).
There are 4 forms of type checking :
weak
strong
dynamic
static
Some people mistakenly consider dynamic == weak and static == strong,
but they are 2 different axis.
HTH,
-D
What an utterly arrogant thing to say... Do you have any arguments
behind this statement?
(I hope this was meant humoristically...)
> --
> Rainer Deyke (ro...@rainerdeyke.com)
> Shareware computer games - http://rainerdeyke.com
> "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
--
Magnus Lie Hetland http://www.hetland.org
"Reality is that which, when you stop believing in
it, doesn't go away." -- Philip K. Dick
Alex, I didn't know your company did PDM. I thought you might be
interested in knowing that our product -- currently dubbed SRM (Supplier
Relationship Management) by market analysts -- has as a subset a "PDM-lite"
type functionality: BOM analysis, product info management, red-lining,
part/BOM change approval, etc. Of interest is that it is written in Jython
(using Swing). We used to do everything in C++, but now its all Java on
the server side with Jython/Swing for all desktop-based GUI's (and HTML for
some of the basic stuff). I'm extremely pleased with our choice of using
Jython/Swing instead of pure Java/Swing for the UI stuff! (And our
customers seem happy with the result, too!).
Jim
You didn't say what you want to accomplish. If the idea of "provably
correct" programs appeals to you, Eiffel will give you more help than any
other practical language I know of. But since your post didn't lay out your
assumptions, your goals, or how you view language characteristics as fitting
in with either, you're not a *natural* candidate for embracing Design by
Contract <0.6 wink>.
For those that don't know what this does:
> perl -e "print '1' + '1'"
This applies Perl's addition operator to two "strings" composed of digits.
Returns 2.
> perl -e "print 1 . 1"
This applies the concatenation operator to two constant numbers.
This returns 11.
This is due to Perl's (intentional) conversion between numbers and
strings when context (a very important Perl concept) implies it.
You may not agree with this, but it's a matter of personal preference.
It should not involve the preference of a strange author bashing some
other language.
Java, Pike, Perl, Jython, PHP, Ruby. Each has its strengths and
weaknesses. Each has its share of supporters and bashers. (I gleefully
bash Java. =)
<Rant>
While a good deal of time on comp.lang.perl.misc is spent bashing
newbies, I've not once seen a Python-bashing post. I _have_, however,
seen quite a few posts endorsing Python as an alternative. These
posters are not bashed.
</Rant>
To the OP:
If you know what you want in a language, look around till you find it.
If you don't know what you want in a language, use several; see what you
like.
Q: If you ask a man on a basketball court if he likes basketball, what
is he likely to say?
Q: If you ask a Python newsgroup if they think Python is worthwhile,
what are they likely to say?
Inordinately apropos random quotation follows:
--
-Tim Hammerquist <ti...@cpan.org>
Most people are other people. Their thoughts are someone else's
opinions, their lives a mimicry, their passions a quotation.
-- Oscar Wilde
In article <slrn9k5e...@vegeta.ath.cx>,
Tim Hammerquist <t...@vegeta.ath.cx> wrote:
>Aahz Maruch <aa...@panix.com> wrote:
>> In article <qRq07.9790$Wc.64...@nnrp4.proxad.net>,
>> Dublanc, David <ddub...@free.fr> wrote:
>>>
>>>What is exactly weak typing ? I believed that Python was weak typing !
>
>For those that don't know what this does:
>
>> perl -e "print '1' + '1'"
>
>This applies Perl's addition operator to two "strings" composed of digits.
>Returns 2.
>
>> perl -e "print 1 . 1"
>
>This applies the concatenation operator to two constant numbers.
>This returns 11.
>
>This is due to Perl's (intentional) conversion between numbers and
>strings when context (a very important Perl concept) implies it.
>
>You may not agree with this, but it's a matter of personal preference.
>It should not involve the preference of a strange author bashing some
>other language.
Pointing out that Perl has weak typing does not equate to language
bashing.
I still think Haskell would be of higher help. Immutable data
make proving program properties easier (while not _easy_). (If
you're implying Haskell isn't "practical", I'll unchain the
slavering hordes of FP groupies against you... scary threat,
innit?).
Alex
> If C had been recently invented, it would deserve *some* bashing. But
> for
> something invented 30 years ago, it deserves no bashing. It was an
> excellent
> portable language for machines of that era. And in the hands of a
> competent
> programmer it is still an excellent tool.
>
> As for C++, that deserves a moderate amount of bashing.
How about a more modern language, designed from scratch, that still had
case sensitivity, no distinction between functions and procedures, and
needed () to call a procedure without arguments. Would that deserve
bashing?
(c.f. <http://www.elj.com/cppcv3/s4/>)
Graham
This whole argument against case sensitivity is such a crock. Human beings
are case sensitive. These studies suggesting that case sensitivity is confusing
to learning programmers are, IMO, polluted by sampling biases. Here is my
retort to this suggeston that case sensitivity is bad; have fun gouging your eyes
out:
HoW About a MoRE MODern laNGUAgE, DESiGned FrOM sCRATcH, that STilL Had
cAse sENSitIvITY, no distinctiOn bEtwEEN FuNcTIons ANd PROCedUres, aNd
neEDed () to cALL a pRoceDurE wItHOUT arguMENtS. WoULD THAt desERVe
BasHiNg.
C//
You are right.
The "author" here is the one the OP mentioned who bashed C/C++ in favor
of Java, which the OP seemed to take to heart.
Also, I guess I'm a bit defensive, as so many here _do_ make little
snide comments about Perl and such.
--
-Tim Hammerquist <ti...@cpan.org>
Man invented language to satisfy his deep need to complain.
-- Lily Tomlin
I do -- feel free to take me to task when I do make such comments, but
not otherwise.
[Tim]
> You didn't say what you want to accomplish. If the idea of "provably
> correct" programs appeals to you, Eiffel will give you more help than
> any other practical language I know of.
[Alex Martelli]
> I still think Haskell would be of higher help. Immutable data
> make proving program properties easier (while not _easy_). (If
> you're implying Haskell isn't "practical", I'll unchain the
> slavering hordes of FP groupies against you... scary threat,
> innit?).
Consider the questioner. Eiffel is an embodiment of a formal theory of
software construction, and has many language features specifically designed
to make application of that theory straightforward. Thomasz likely doesn't
know either what to prove or how to go about it, in a vacuum; most
programmers wouldn't; Eiffel helps them by providing a well-documented
theory and executable framework; doing it in Haskell instead requires
sucking the theory of functional programming out of scattered papers,
building the proof support machinery by hand, and then persistent commitment
to use it.
Immutability isn't really much help when the *interesting* questions are
about how dozens of subsystems interact with each other; documented and
automagically enforced preconditions, postconditions, and class invariants
do help, and in large part by forcing the programmer to *think* about them.
If you try to do something similar in Haskell, you have to bring the
motivation and support tools with you. DBC never catches on in Python for
much the same reasons, I fear.
too-clumsy-==-won't-be-used-except-by-motivated-experts-and-those-are-
the-ones-who-need-it-least-ly y'rs - tim
I'm sorry. The honest original intention of the post was to explain the
Perl to Pythonistas, as they may likely not know Perl.
You were never intended to be a target and I apologize if I
inadvertently offended you.
Best regards.
--
-Tim Hammerquist <ti...@cpan.org>
Not all who wander are lost.
-- J.R.R. Tolkien
Are you able to learn more than one programming language? I find that
knowing a variety of languages, and learning new ones that look promising,
is a most practical approach. To feed myself and my family I find SQL,
Visual Basic, VBScript, C/C++, and Java very useful things to know. When I
am free to choose the implementation language (which frequently means I'm
not getting paid) I choose Python almost all of the time. I used to make
good money and even have some fun with Fortran, COBOL, and x386 assembly
language, but demand for those has fallen off recently, so I'm glad I
"jumped on the C bandwagon" when I did.
If I had to choose one language to use for the rest of my life I would
certainly put Python on the short list. Fortunately the world is bigger than
that, and I'm blessed with the ability to program capably in several
programming languages at a time.
Greg Jorgensen
PDXperts LLC
Portland, Oregon, USA
gr...@pdxperts.com
"Tomasz Stochmal" <t...@peresys.co.za> wrote in message
news:f20ea932.01070...@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 ?
>
>reason to use Basic? After all, supposedly 80% of all business apps are
>written in Basic - presumably Visual Basick since they've pretty
>effectively killed off that entire market segment. Personally, I think
>i'd rather take up a career as William Park ;)
You still see the odd business utility running in DOS - some old Turbo
BASIC and QBASIC programs among them. Last I checked, QBasic was still
provided on Windows CDs - it just doesn't install by default. I
wouldn't be surprised if GWBASIC isn't hanging on in some strange
corners of the world - and it's quite likely that some people have old
Atari STs or Amigas with BASIC programs to do some task which work
well enough that no-one felt a need to replace them. I actually have
quite fond memories of GFA BASIC and STOS - though not *that* fond
really.