hashOf()

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 2 09:27:54 PDT 2016


On Wednesday, November 02, 2016 16:19:44 John Colvin via Digitalmars-d 
wrote:
> I think that "internal" means "for internal use", I.e. don't
> import and use it outside.
>
> You could argue that object.hashOf should hash the contents of
> slices, not just the meta-data (i.e. length / ptr), but that's a
> separate matter.

Yeah. Don't use anything in an internal package in either druntime or
Phobos. And now that we can do stuff like package(std), it should be
possible to fix it so that those symbols _can't_ be imported while still
being usable by other code inside the higher level package. Previously, the
only way to have core.internal accessible by the rest of core was to have it
be public, which then didn't actually prevent you form doing stuff like
importing it in your own code even though you shouldn't. So, core.internal
should be fixed to use package(core).

- Jonathan M Davis



More information about the Digitalmars-d mailing list