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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx01.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:30.0) Gecko/20100101 Thunderbird/30.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A bad counterintuitive behaviour of Ada about OO References: <932kntuq5rrr.8sumwibqrufn.dlg@40tude.net> <1ohy7vnbntskq$.h139ov04mlxu$.dlg@40tude.net> <1lREv.450693$4n.74225@fx31.iad> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Fri, 08 Aug 2014 08:12:02 UTC Organization: TeraNews.com Date: Fri, 08 Aug 2014 02:12:00 -0600 X-Received-Bytes: 2045 X-Received-Body-CRC: 279224321 X-Original-Bytes: 2062 Xref: number.nntp.dca.giganews.com comp.lang.ada:188235 Date: 2014-08-08T02:12:00-06:00 List-Id: On 08-Aug-14 01:49, J-P. Rosen wrote: > that's why I regularly object to the > argument that "you can do everything with OOP, therefore you must do > everything with OOP". I certainly agree. One of the biggest disservices the CS education establishment has done [IMO] is to push OOP (and especially extensibility) to the point that many CS graduates have the idea that "if you can't extend it, it's bad/worthless/flawed." Restriction is so pervasive [we all used it in math, esp. for proofs], and useful that I find it amazing that Ada's Subtype facility *isn't* a common thing in programming languages -- and there are [lots of] programmers who seem not to grasp the utility thereof. :( I mean you really can't use OOP to do: Subtype Natural_Float is Float range 0.0 .. Float'Last; Function Sqrt( X: Natural_Float ) return Natural_Float; {At least not elegantly.}