Proposal: add new Data.Bits.Bits(bitZero) method

Daniel Trstenjak daniel.trstenjak at gmail.com
Mon Feb 24 10:14:39 UTC 2014


On Mon, Feb 24, 2014 at 10:47:47AM +0100, Henning Thielemann wrote:
> ... only if you plan to add another "zero" thing to the Data.Bits
> module. Conflicts with other modules must be resolved with importing
> mechanisms, but not by finding names that are different from all
> other identifiers in all other modules in all other packages. It
> just makes no sense to have a nice module system, but use it like
> the #include directive of the C preprocessor and eventually maybe
> complain about the deficiencies of the current module system.

Yes, I'm thinking in the same way.

Having "unique" names also seems to encourage to import modules
unqualified, which sometimes is understandable - and I won't tell that
I'm never doing it ;) - but at the end might have its own issues.

Sure, the possibility to get future conflicts by importing 'zero'
unqualified might be higher than with 'zeroBits', but using the
qualified name 'Bits.zero' isn't any longer and it's more likely
that you won't be getting conflicts in the future that way.

And if you're having some local, algorithmic code, these post fixes
like 'Bits' are just annoying and cluttering your code.


Greetings,
Daniel


More information about the Libraries mailing list