Namespaces - Importing versus Explicit Naming (was Re: [Modules] Upper

Cees de Groot cg at home.cdegroot.com
Wed Feb 20 07:40:04 UTC 2002


Doug Way <dway at riskmetrics.com> said:
>The Java project I'm working on strictly uses approach B.  There are *no* duplicate classnames among 1000 or so classes across many packages in the app.  A few imported classnames from other frameworks conflict, but very rarely.  (Two different external packages each had their own implementation of a Date object, which was confusing.)
>
Just to add a data point: in my current VW project, with some 400 classes and
no 'thou shall not make up duplicate names' rule, we have one duplicate name
and that has attended us to the fact that the name in fact was a bad name for
both classes (FooBarProcessor, 'Processor' being much too
abstract/generic/whatever). In Java, I used to have similar metrics.

So I agree that IRL, duplicate names are not a big issue and unit tests will
quickly uncover any mix-ups. 

-- 
Cees de Groot               http://www.cdegroot.com     <cg at cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B



More information about the Squeak-dev mailing list