[SqNOS] Another aesthetic question

Gerardo Richarte gera at corest.com
Thu Jul 13 13:36:44 UTC 2006


The device I'm working on, as well as other devices, have bits which can
be set, cleared and tested. For this we need three different methods
(could be two). The question is on how to name them:

opt. 1:
    isOwnedByHost    (test)
    beOwnedByHost   (set)
    beOwnedByCard   (clear)

opt. 2:
    ownedByHost (test)
    etc.

opt. 3:
    isEndOfPacket   (test)
    beEndOfPacket   (set)
    dontBeEndOfPacket   (clear)

opt. 4:
    isEndOfPacket   (test)
    endOfPacketSet
    endOfPacketClear

    or any mix, or anything else. Right now I have a mixture, like opt1
and opt4. I'm not sure if this is the best thing to do (mix the flavors)
or stick to a more strict naming convention and leave the English
semantic aside. Remember English is not my native tongue, so I may as
well misjudge what's sounds better.

     Uses of this would be, for example

    receiveRing isOwnedByHost ifTrue: [queue add: (EthernetPacket bytes:
receiveRing message)]

    transmitRing beEndOfPacket.
    transmitRing dontBeEndOfPacket

    or

    transmitRing endOfPacketSet
    transmitRing endOfPacketClear

    thoughts?
    thanks!
    gera.


More information about the SqueakNOS mailing list