Kilgallen@SpamCop.net (Larry Kilgallen) wrote in message news:... > In article , > kanze@gabi-soft.fr writes: > > James Rogers wrote in message > > news:... > >> Since this was cross-posted to comp.lang.ada I think it is fair to > >> mention that there is a language that meets your description above. > >> That language is Ada. > > Permit me to be sceptical. If your claim is that Ada has more of the > > safe defaults than C++, I doubt anyone would dare argue it. If your > > claim is even that most of the defaults are the safe version, from > > what little I know of the language, it would seem true. But to say > > that in 1983, they got everything right, including problems that > > weren't even understood until significantly later. Well, I'm > > sceptical. Perfection just isn't of this world. > > One point where I'm pretty sure Ada 83 didn't have the right default > > (although they may have fixed it in Ada 95): garbage collection. > > While there are places where it is necessary to turn garbage > > collection off (which seriously limits the use of a language in > > which you cannot have untraced pointers, which the garbage collector > > cannot see), the safe option is obviously to have it on by default, > > no? > Perhaps it depends on what one means by the word "safe" :-), The easier it is to write robust code with the language, the safer it is. > but even with Ada 95 provision of any garbage collection is up to the > compiler vendor. Since the language definition does not mandate > garbage collection, it cannot very well mandate that it be defaulted > on or defaulted off. > Does the C++ standard mandate garbage collection be on or off ? Formally, the C++ standard says nothing about garbage collection. Formally, there are one or two things in the C++ standard that make garbage collection impossible. Practically, those things aren't used, and an implementation could (and some, like Sun Forte, do) offer garbage collection as an option. I know that in many cases, garbage collection isn't an option. This is probably particularly true in the type of applications where Ada is most used (although it isn't the case of the uses of Ada I'm familiar with). Still, it is the safer option; IMHO, it should be on by default, but with options to turn it off. -- James Kanze GABI Software mailto:kanze@gabi-soft.fr Conseils en informatique orient�e objet/ Beratung in objektorientierter Datenverarbeitung 11 rue de Rambouillet, 78460 Chevreuse, France, T�l. : +33 (0)1 30 23 45 16 [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]