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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Things that OO programming lacks Date: Sat, 15 Nov 2014 20:46:54 +0100 Organization: A noiseless patient Spider Message-ID: References: <86bf69c8-eb08-4696-b6c9-3784f5c42213@googlegroups.com> <87389olqie.fsf@ixod.org> <10d9w.55626$8w1.22302@fx12.iad> <150er0b62wsh3$.1xabmp81w5kdw.dlg@40tude.net> <1azsoc77wjhmi$.1grmnnlq033tz.dlg@40tude.net> <5yzci4a8snfg.1dfsqjyvneeym$.dlg@40tude.net> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 15 Nov 2014 19:46:43 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e99ec869354906d907c7ba3a2105bade"; logging-data="18622"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uZmoaRip+AqZTp62Z7dCm9YERH3xyN/g=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Cancel-Lock: sha1:2zLrZzoNlAmIuhTRs55wxl+OGAQ= Xref: number.nntp.giganews.com comp.lang.ada:190697 Date: 2014-11-15T20:46:54+01:00 List-Id: On 14.11.14 17:32, Dmitry A. Kazakov wrote: > But, again, what would be better? >> Better? A mode of expressing what we know beyond our objects, >> in dedicated language: I mean our objects, not OO objects. This is about expressing notions. >> For example, "connections" may refer to order of calls in time, >> and to "flow" caused by "data". > > For example Ada.Streams show us "connecting patterns". Ada.Streams doesn't show much, since some connections are implicit. Which is the point. "Open" would be a hint at the object to/from which data will flow, but you'd still have questions if a different task object somehow has access to the stream. You look at the task's definition, and you still miss the part that caused the I/O disaster. That's because "connecting" data to the stream can happen anywhere this stream is visible, and if you do *not* apply C-style discipline, then the *language* won't help. (Broken record: "bad design, bad design, bad design, ..." Another broken record: "use int properly, use int properly, use int properly, ...") Any competent engineer can write perfectly good programs in the assembly language he knows, for the machine he knows. That's beside the point, though, and it hides all the difficulty that an undefined (before the fact) word like "competent engineer" must produce. >> Another important example is events. > > I didn't list event-driven ... nobody should seriously consider > it as useful. GUI... Suppose it could be made less of a burden to program any advanced multithreaded GUI, adding controls and interactions. > In relational there are relations (and a > fixed set of types). (I learned that in "relational" there are arbitrarily many types ("domains"). Even in some of its restricted SQL incarnations.) > If you want going data-driven I don't want to be driven. ;-) Starting from my universe, I notice that it determines orders which cannot be designed away: "First the water, then the acid, otherwise it won't be placid!" "Be sure to open the lid before you add further ingredients, then close the lid again." I need necessary orders to be expressed, not denied for methodological reasons of a foreign universe. In short, I want a higher level: - procedural includes assembly power (minus a bit) - OO includes procedural power (minus a bit) - ??? includes OO power (minus a bit) <-- this I want I want a program text to tell its readers what is supposed to happen in certain situations. I want that information to be explicitly stated directly in source text, without inference, with the help of dedicated visible language features. By analogy, monads are a way of integrating I/O with functionism. I want something like this in the OO programming world, at the level of language definition, so that I can answer questions I might be asked about a program and its effects simply by pointing my finger at some one line of text. If Obj_1 and Obj_2 are objects, then I would like the language to have syntax, say "(*)", for Obj_1 (*) Obj_2 which would *not* be a function call. I would like the language to have syntax, say "{<#}" or "{#>}", for Event_1 {#>} Obj_1, Obj_2, Obj_3 The cheap language version would start to make these pieces of syntax mark relationSHIPs first, and then the compiler would check that these relationships actually exist. If the marks turn into relations, fine, but that makes relations just a way to formalize specific relationships behind the scene.