[prev in list] [next in list] [prev in thread] [next in thread] 

List:       e-lang
Subject:    [E-Lang] carMaker, carClass, Car (was: real live newbie caught trying to learn E)
From:       Zooko <zooko () zooko ! com>
Date:       2001-10-24 14:02:07
[Download RAW message or body]


 MarcS wrote:
>
> The term Maker is a naming convention, and as such it is easy for you to
> disregard in your own stuff if you feel that strongly, and it is changeable
> in E in general "simply" by persuading me to rewrite the book using a
> different convention (this is "simple" because it requires no code changes
> :-)  Two other naming conventions have been considered at different times:
> 
> --using Class as the suffix, as in carClass rather than carMaker
> --using capitalization to denote the constructor rather than a suffix, as in
> Car rather than carMaker

FWIW I looked at several "Java coding style" documents including the official
Sun ones and it seems that class names always have uppercase first letter and
variable names and data member names almost always have lowercase first letter.  

I think most C++ programmers do this as well.

Also, I personally like Python, where the convention is that constructors are
first-letter-uppercase name-of-the-class, e.g.

mycar = Car()

So that last convention seems to be widely used and I personally prefer it.

I'm not sure which convention would be most helpful to newbies struggling with
this "Where is the class?" problem.  I *have* heard more than one newbie
complaint that "thingMaker" is aesthetically displeasing.

Regards,

Zooko

_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic