Do you mean starting with an underscore? I don't like the idea of overloading
the attribute name.
So you would write:
guide (); // get value.
guide (g); // set value.
They look too similar.
I prefer:
guide (); //get value
set_guide (g); //set value
add_guide (g); // to add a guide.
> >
> > - how should we name methods that test things: eg: a method that tests whether
> > an object is primitive should be called, is_primitive, primitive, or what?
> >
>
> isPrimitive()
>
Ok, so to test for something we use a method that starts with is_
>
> > - Should we use collection classes instead of sequence? I am afraid that the
> > sequence stuff is going to generate ugly code that will be hard to fit into
> > Amulet.
>
> Does this mean Collection is unrestricted order? Talking about this,
> any suggestion on standard data types? Should we use a commercial package,
> a public domain one, or implement our own?
>
We should not implement our own. We can use LEDA (free to universities) that
already has lots of collection classes. Also, Amulet also has a few
collection classes that it understands, and knows how to integrate well with
the rest of the object system.
> >
> > Let us try to come up with a convention quickly so that we don't have to
> > change our specs later on. Here are some ways to select a convention:
> > - select a convention used in another system we regard as well written. For
> > example Fresco's convention (Capitalized types, eg SomeType; lowercase
> > methods, eg do_something; lowercase variables).
> > - use Amulet's convention, given that we will use Amulet.
> > - invent our own.
> >
> > I vote for using Amulet's convention even though I think the Fresco convention
>
> I personally like Fresco standard because it's easier and more
> natural to type. Since we have to integrate code with Amulet, it's even a
> stronger reason to use a convention which is different, so we can spot our
> code and their code easier.
>
> Fresco standard is close to Smalltalk. In addition, Smalltalk-80 has this
> restriction that class names must begin with an Uppercase letter while instances
> and methods use a lowercase letter as the first character. I think we should
> use this standard too.
>
>
I also vote for the Fresco conventions. Noi's examples in the code above do
not really follow the Fresco conventions.
I think for example that isPrimitive should be written as is_primitive
according to the Fresco conventions.
Going once, going twice, GGGGGONE?
Also, let's go with the Fresco conventions for defining the IDL (comments with
//- and //.) so that we can generate the reference manuals automatically from
the IDL definitions.
Pedro Szekely
USC/ISI, 4676 Admiralty Way, Marina del Rey, CA 90292
Phone: 310/822-1511, Fax: 310/823-6714
URL: http://www.isi.edu/isd/HUMANOID-HOME.html