From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!xmission!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: comp.lang.ada Subject: Re: Heartbleed Date: Sat, 12 Apr 2014 20:56:32 +0200 Organization: Informatimago Message-ID: <87ioqe4brz.fsf@kuiper.lan.informatimago.com> References: <1ljwj8f.1wqbhvuabsdw1N%csampson@inetworld.net> <51c7d6d4-e3be-44d5-a4ce-f7e875345588@googlegroups.com> <%J32v.70539$kp1.45343@fx14.iad> <87mwfq4vvj.fsf@kuiper.lan.informatimago.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net mHezUJA9hENNDEtoUSFnAAZov8Pq8wc66/4YM1hVXGOM5RCA+i Cancel-Lock: sha1:OWE3MWM1OWMxZDdjOThiOTkyYmY4ZTk1YmYyMWUzZTNkMDEwZWM4MA== sha1:aoygo7Vl7FkRs+cnCeSBNYn6/uY= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Xref: news.eternal-september.org comp.lang.ada:19275 Date: 2014-04-12T20:56:32+02:00 List-Id: "Nasser M. Abbasi" writes: > On 4/12/2014 6:42 AM, Pascal J. Bourguignon wrote: >> "Nasser M. Abbasi" writes: >> >>> Python also is weakly typed. >> >> You're wrong. Compare: > > How can I be wrong when in Python variables do not even have > types, only values do. > > But any way, I was comparing it to Ada strong variable type > system. That's the whole point. Typing values instead of typing variables is stronger. When you have a system where all the values are typed, if there's a bug (either because the language allows unsafe operations, or because there's a bug in the system, or because there's a hardware failure), you still have the assurance that only operations valid for this type of value can be applied to it. And the specific operation applied is dispatched at run-time, depending on the type of value we encounter at run-time. >>>> a=float(1); >>>> b=int(1); >>>> c=a+b; > > The above will not even compile in Ada. Mixing apples and > oranges. > > Python is not a language I would use to write robust > software that if failed, people can die as a result. Lets > leave it here. IIRC, Ariane 5 software was written in Ada. http://www.di.unito.it/~damiani/ariane5rep.html In a language like lisp or python, the arithmetic operations that can't produce fixnums automatically produce bignums, and all the code will automatically handle bignums once the magnitudes require them. Similarly, the Mars Climate Orbiter bug occured in statically typed programming language: variables containing different units were still of the same floating point data type. http://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_failure A dynamically strongly typed-value programming language such as Lisp or Python would have used objects containing both the magnitude and the unit, and an operation mixing objects of different units would have involved an automatic unit conversion. In both cases, the customer could still consider that a bug exist (in the case of Ariane 5 it was a specification "bug", so…), in that operations could become slower than expected, but with dynamically typed-value system, you would still get correct results. And in a control system, it is better to generate correct control commands at half the expected rate, than to crash or produce bad control commands at the initially specified rate. -- __Pascal Bourguignon__ http://www.informatimago.com/ "Le mercure monte ? C'est le moment d'acheter !"