[Tutor] Name for this type of class?
Alan Gauld
alan.gauld at yahoo.co.uk
Sun Aug 4 09:46:26 EDT 2019
On 04/08/2019 09:15, Alan Gauld via Tutor wrote:
>>> Classes should never be named for their data but for their function.
> I was not suggesting that a class name should be a verb,
I think my biggest mistake here was the use of the word
"function" which, in a programming community, has a very
specific meaning whereas I was thinking of the natural
English meaning.
It might have been better if I'd said classes should be
named for their *purpose* or their *role*.
And, in fact, that's true of any variable in any language,
it should express intent not internal structure.
Apologies for any resulting confusion.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list