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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: donh@syd.csa.com.au (Don Harrison) Subject: Re: Eiffel and Java Date: 1996/10/30 Message-ID: #1/1 X-Deja-AN: 193081654 sender: news@syd.csa.com.au x-nntp-posting-host: dev11 references: organization: CSC Australia, Sydney reply-to: donh@syd.csa.com.au newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.c++ Date: 1996-10-30T00:00:00+00:00 List-Id: Matthew Heaney writes: :Ada's type mechanism accomplishes the equivalent of pre- and :post-conditions, and you don't seem to mind their inclusion in Eiffel, so :that can't be it. It's true that Ada's typing does accomplish some of what assertions offer but assertions are more general (and useful) than that. For example, it is possible to specify that *any* boolean condition on a parameter must hold - not just that it belongs to a particular family of types or that it's value satisfies a range constraint. Any of a number of Eiffel books provide more info. :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. Don. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Don Harrison donh@syd.csa.com.au