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: border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: 'Protected' abstract subprograms Date: Sun, 12 Jan 2014 11:19:41 +0200 Organization: Tidorum Ltd Message-ID: References: <839fee13-2743-49f6-a7f3-f95578386201@googlegroups.com> <14q37tx4uvbw4$.ua9oe7a01emv.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net hJZZvG1oTAo0gbLZOH496gqNJ9knn7PsORrlf+bU/JJ0X5u6qR Cancel-Lock: sha1:9mcQLyMwvOsjXpEDLdwpIBj6X3s= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <14q37tx4uvbw4$.ua9oe7a01emv.dlg@40tude.net> Xref: number.nntp.dca.giganews.com comp.lang.ada:184403 Date: 2014-01-12T11:19:41+02:00 List-Id: (I said I wouldn't, but here I go...) On 14-01-11 21:35 , Dmitry A. Kazakov wrote: > On Sat, 11 Jan 2014 15:42:39 +0200, Niklas Holsti wrote: > >>> * When you dispatch in a body of an operation that means that the body is >>> valid for more than one type. Many types = class. Operation for all class = >>> class-wide operation. >> >> Yes, but "many types" is not the same as "all class". > > Per design pattern it is all class. Anyway, it is certainly not the > singleton type specified in the pattern, because that is type is abstract. > > But of course, if you want to propose changes in the language which would > allow specification of narrower subclasses for such cases, it would be most > welcome. As I see it, it is you who are proposing a change: you say that redispatch should never be used, so you are proposing a reduced Ada language which does not *have* redispatch. >>> Re-dispatch breaks this model and effectively makes your design >>> un/weakly typed. >> >> I don't agree, because my conceptual "model" is different. Your model is >> stronger (more specific) than mine, which paradoxically means that it is >> easier to break :-) > > Wouldn't that be arguing against strong typing? Your concept of classes and types is stronger (more specific and limiting) than what Ada provides -- in effect, you have certain design rules which limit you to an Ada subset without redispatch. Ok, if you find that these rules are beneficial to you, you are free to follow them, and to suggest that others should follow them too. But you have not convinced me that these rules are an improvement on the type model that Ada provides, which includes redispatch. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .