home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!odi!dlw
- From: dlw@odi.com (Dan Weinreb)
- Subject: Re: A question of notation
- In-Reply-To: moss@cs.umass.edu's message of 22 Jul 92 14:35:37 GMT
- Message-ID: <1992Jul23.144937.25764@odi.com>
- Reply-To: dlw@odi.com
- Organization: Object Design, Inc.
- References: <graham.711774150@galois> <MOSS.92Jul22103537@ibis.cs.umass.edu>
- Date: Thu, 23 Jul 92 14:49:37 GMT
- Lines: 37
-
- In article <MOSS.92Jul22103537@ibis.cs.umass.edu> moss@cs.umass.edu (Eliot Moss) writes:
-
- An additional remark I would make is that there is no "standard" about this at
- all. Trellis does it the M (O ...) way (kind of following CLU syntax),
- Modula-3 does it the O.M way, and Smalltalk does it O M with arguments, if
- any, mixed in with the method name. Syntax can be relevant to readability,
- writablity, and software engineering concerns deriving from them, but there
- are no semantic power or expressiveness reasons to prefer one of these forms
- over another.
-
- I agree and I'd like to add a footnote.
-
- In Lisp-with-Flavors (or Lisp-with-CLOS), the language both has the
- concept of "function call" and "message send". The main difference
- between Old Flavors and New Flavors was to go to a syntax in which a
- "message send" looks syntactically like a function call.
-
- A typical Old Flavors "message send": (send my-window :refresh)
- A typical New Flavors "message send": (refresh my-window)
-
- We considered it a big advantage to use the same syntax for both
- ordinary functions and "message sending", for several reasons.
-
- The main reason was modularity. The idea is that from the point of
- view of the caller, "refresh" is an operation with a certain contract.
- Whether "refresh" implements that contract by using an automatic type
- dispatch or not is an internal implementation issue that should not be
- reflected in the advertised interface.
-
- Secondary reasons were so that "message send" operations could be
- treated as "funargs" in a uniform way, and things like that.
-
- CLOS is like New Flavors in this respect. C++ is analogous to Old
- Flavors in this respect.
-
- In languages with no special distinction between "function call" and
- "message send" (e.g. Smalltalk), of course, this issue does not arise.
-