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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,953e1a6689d791f6 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,953e1a6689d791f6 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,953e1a6689d791f6 X-Google-Attributes: gid103376,public From: jcm@hgc.edu (James McKim) Subject: Re: Eiffel and Java Date: 1996/10/31 Message-ID: <1996Oct31.202857.3481@merlin.hgc.edu>#1/1 X-Deja-AN: 193498212 sender: usenet@merlin.hgc.edu (Action News Central) references: organization: The Hartford Graduate Center newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.c++ Date: 1996-10-31T00:00:00+00:00 List-Id: In article donh@syd.csa.com.au writes: >Matthew Heaney writes: [..] > > >:About subprogram calls. C++ or Eiffel programmers call objects this way: >: >: theStack.push (5); >: >:and Ada programmers do this >: >: Push (5, On => The_Stack); >: >:It's not a moral issue which way is better, just a difference in syntax. >:They both do the same thing. > >Yes - not something to lose sleep over. The Ada syntax can be justified >because it is a hybrid language. IMO, the dot notation is preferable for >Eiffel because it is a pure, single-dispatched language. For such >languages, it makes sense to isolate the dispatching parameter to show that >it is special. The downside is that symmetric operations do not appear as >such. Well, not really, because you can always regain it by inventing another >class for performing symmetric operations: > >eg. class SET_OPS > ... > union (a, b: SET): SET is ... > intersection (a, b: SET): SET is ... > ... > end > >In any case, truly symmetric operations are relatively few, IMO. In an article in the 10/94 issue of JOOP, Richie Bielak and I argued that such features should really be creation routines in class SET. IMHO, the dot notation and the desire for symmetry are almost orthogonal issues. For better or for worse many library classes for languages that support the dot notation have chosen to design intrinsically symmetric operations in an asymmetric way, but that is not the only way. > > >Don. >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- >Don Harrison donh@syd.csa.com.au > > Hope this helps, -- Jim -- *------------------------------------------------------------------------------* Jim McKim (860)-548-2458 Teachers affect eternity. They can never tell Internet: jcm@hgc.edu where their influence stops.