From: Carey Tilden on
On Mon, Aug 2, 2010 at 3:18 PM, sturlamolden <sturlamolden(a)yahoo.no> wrote:
>
> Perl is written in C++. That is not enough to make me want to use
> it ;)

I realize this was meant to be funny, but it's not true, and detracts
from the point you were trying to make. Maybe skip the pointless jabs
at Perl and stick to things you know more about.
From: Peter on
On Aug 3, 8:27 am, Paul Rubin <no.em...(a)nospam.invalid> wrote:
<snip>...
>
> Certain folks in the functional-programming community consider OO to be
> a 1980's or 1990's approach that didn't work out, and that what it was
> really trying to supply was polymorphism.  C++ programs these days
> apparently tend to use template-based generics rather than objects and
> inheritance for that purpose.  
>
> I've never programmed in Ada but I'm intrigued by these articles:
>
>  http://adahome.com/Ammo/cpp2ada.html
>  http://www.adaic.org/whyada/ada-vs-c/cada_art.html
>
> I have the impression that Ada has an undeservedly bad rap because of
> its early implementations and its origins in military bureaucracy.  I'd
> certainly consider it as an alternative to C or C++ if I had to write a
> big program in a traditional procedural language.

I used to work for defence contractors - Ada (IMO :-)) is the very
best OO language for real-time and embedded systems. It scales
fantastically well to large, multi-platform jobs as well. If I had my
way we would use it where I work now (biomedical field) but that isn't
an option - too many folk are brought up on a steady diet of C/C++ and
therefore don't know any better, plus there is a dearth of Ada
compilers for the CPU's that we use here (all embedded work). I have
used fortran, C, C++, some Java, Ada (and Python :-)), if I had my
choice for the type of programming I do here at work, it would
definitely go to Ada by a country mile.

Having said that though, I won't replace Python with it on my desktop
for the type of stuff I do around the fringes of my job (test scripts
etc) and my personal programming :-)

But for anyone who wants to expand their horizons, learning Ada would
be an excellent choice (although like any learning activity, unless
you have a concrete goal in mind you will probably just waste your
time :-)). It is not an easy language to just pick up and run with
because the strong type-checking FORCES you to think about and design
your program very carefully from the very beginning - something that
many programmers find an abhorrence for :-) But I always used to tell
people - by the time I got a program to compile then I figured 99% of
the bugs were already discovered! Try that with C/C++ or almost any
other language you care to name :-)

Peter
From: Paul Rubin on
sturlamolden <sturlamolden(a)yahoo.no> writes:
> It is annyingly verbose, reminds me of Pascal (I hate the looks of
> it), and is rumoured to produce slow bloatware.

The earliest Ada compilers were terrible, but they are about like C
compilers now, so the output code is ok (see Alioth shootout for
example). I agree about the verbosity but I don't think that's too big
a problem in the sorts of systems that need to be written in such
languages.

> And don't forget Ariane 5 ;)

I have looked into that a few times and I do wonder whether the language
or release process could have been of any help. One possibility is
using something like SPARK to ensure the absence of overflow exceptions.
Another is automatic test generation something like

http://www.stanford.edu/~engler/klee-osdi-2008.pdf

but that approach was probably unknown at the time.
From: Roy Smith on
In article
<0ed1fb16-87cb-4fb9-85b2-08d876445d5d(a)q22g2000yqm.googlegroups.com>,
sturlamolden <sturlamolden(a)yahoo.no> wrote:

> The typical examples revealing incompetence are use of
> new[] instead of std::vector

To be fair, there were usable C++ compilers before there were usable STL
implementations. Thus, it should not be surprising to find older C++
code bases eschewing the use of STL. That's not to say that this trend
should be propagated in current educational material.

> and dynamic resourse allocation outside contructors.

This one I don't understand. Yes, I get RAII, but surely there are
valid reasons to allocate memory outside of constructors. Containers
which resize themselves (such as std::vector) are one obvious example.
From: Roy Smith on
In article <i37ire$7gd$1(a)panix5.panix.com>, aahz(a)pythoncraft.com (Aahz)
wrote:

> http://www.netfunny.com/rhf/jokes/98/May/stroustrup.html

The same story has been floating around for eons, just with the names
changed. I saw one where Wirth was ostensibly making fun of the people
who didn't understand that Pascal was all just a joke.

I'm sure if you go back far enough, you can find a McCarthy / Lisp
version. It probably goes something like, "So, anyway, we tried to
figure out what was the most absurd way to abuse punctuation we could
imagine. Somebody suggested that every program would have to end with
37 close parentheses. When we finally stopped laughing, we started
sketching out a grammar on the chalkboard that would let us do that".