Re: More on IDL

Piyawadee Sukaviriya ([email protected])
Thu, 15 Dec 1994 11:03:13 -0500 (EST)

These are my preferred conventions for different things. I assume you
want a vote and/or suggestions.

> - conventions for attributes and methods names: should we use get... add...
> remove... destroy...., what are the standard prefixes.

I suggest using _attribute() for getting the value, and _attribute(attr a)
for setting the value, and addAttribute(attr a) for appending a value. This
way we don't have to remember whether it's get_attri, GetAttri, or Get_attri.

>
> - 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()

> - 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?

>
> 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.

--Noi