[Prev][Next][Index][Thread]

# Re: wish lists

- Date: Tue, 23 Jul 1996 12:11:36 PDT
- From:
- Content-Type: text/plain; charset=us-ascii

    Two things I'd like to see that would make coding much simpler and ehance the
    OO features of the language are:

    a) allowing verbs to be called with the . operator instead of : operator,
       i.e. object.verb(args)

    b) a mechanism for encapsulating property references.

    What I mean by (b) is probably easier to explain by example. In IdealMOO(tm),
    there is the following piece of code:

    	...
    	d.number = 5;
    	...

    Now, d happens to be a large display panel in the square. When the property
    changes, the number on the front does too. This is done by encapsulating the
    number property. When the above expression is executed by the server, instead
    of merely setting the property it calls d:_set_number(5) instead.

    	d:_set_number():
    		object.number = arg[1];
    		object.description = tostr("A display panel with a ",
    			object.number, " on the front.");
    		return;

    Likewise, reading d.number would instead return the result of d:_get_number(),
    which wouldn't be defined in this case.

    *I* think this would be extremely useful and reduce the amount and complexity
    of code considerably, particularly integrated with (a). It would avoid the
    extremely nasty o.description and o:description() `feature', for a start.

    What do people think?

    --
    ------------------- http://www-hons-cs.cs.st-and.ac.uk/~dg --------------------
       If you're up against someone more intelligent than you are, do something
        totally insane and let him think himself to death.  --- Pyanfar Chanur
    ---------------- Sun-Earther David Daton Given of Lochcarron ------------------

Follow-Ups:

- Re: wish lists

- From: Sander van Drooge <sander@dds.nl>

- Re: wish lists

- From: RICHARD JACOB CONNAMACHER <phantom@sfsu.edu>

- Prev: Re: wish lists
- Next: Re: wish lists
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index