Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!claris!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.lang.c++ Subject: Re: Why doesn't c++ allow overloading member operators? Message-ID: <7755@apple.Apple.Com> Date: 22 Mar 88 22:49:36 GMT References: <11778@sri-spam.istc.sri.com> <8180005@eecs.nwu.edu> <5868@watdragon.waterloo.edu> Reply-To: lsr@apple.UUCP (Larry Rosenstein) Organization: Advanced Technology Group, Apple Computer Lines: 16 In article <5868@watdragon.waterloo.edu> gjditchfield@violet.waterloo.edu (Glen Ditchfield) writes: > >Another problem is that "." functions are often proposed as a way of >getting lvalue pseudo-members. A Trellis/Owl paper (in OOPSLA '86?) >gives as an example a thermostat object whose setting is changed by >assigning to the "Celsius" field or to the "Fahrenheit" field. The value Trellis/Owl is based on CLU. In CLU the expression 'x.name' was syntactic sugar for the invocation 'typeof(x)$get_name(x)'. The assignment 'y.name := q' was sugar for the invocation 'typeof(y)$set_name(x, q)'. It seems as if C++ could use the same kind of mechanism. -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 32E Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr