Annoying module name / typename conflict

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Apr 2 16:32:55 PDT 2012


On Mon, Apr 02, 2012 at 07:21:53PM -0400, Jonathan M Davis wrote:
> On Monday, April 02, 2012 16:01:38 H. S. Teoh wrote:
> > On Mon, Apr 02, 2012 at 06:46:07PM -0400, Jonathan M Davis wrote:
[...]
> > > The simplest is just to rename the module so that it's all
> > > lowercase. I believe that most people give modules all lowercase
> > > names. It's what Walter recommends, but I know that others (e.g.
> > > Don) don't like that recommendation. It does solve the problem in
> > > this case though.
> > 
> > [...]
> > 
> > Actually, it doesn't because I have some structs that have lowercase
> > names.
> 
> Which I'd argue is bad practice, but that's up to you. The typical
> thing to do is to use PascalCase with type names and camelCase with
> everything else.
[...]

Yes, I know. :-) But then it's not consistent with built-in type names.
But anyway, "import S : S" is an acceptable workaround, so I'll just
stick with that.


T

-- 
Obviously, some things aren't very obvious.


More information about the Digitalmars-d mailing list