[SqNOS] Another aesthetic question
Johnathon Meichtry
johnathon-dev at meichtry.org
Thu Jul 13 13:56:58 UTC 2006
I like option 4 as it matches in my mind what I am picturing the
device/method to be doing at the time. Opt 3 is also good as it matches
more closely typical Squeak method naming semantics.
Johnathon
----- Original Message -----
From: "Gerardo Richarte" <gera at corest.com>
To: <squeaknos at lists.squeakfoundation.org>
Sent: Thursday, July 13, 2006 2:36 PM
Subject: [SqNOS] Another aesthetic question
> 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.
> _______________________________________________
> SqueakNOS mailing list
> SqueakNOS at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
>
More information about the SqueakNOS
mailing list