D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4718 - Few Phobos modules renames
Summary: Few Phobos modules renames
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-23 17:36 UTC by bearophile_hugs
Modified: 2015-01-25 02:34 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2010-08-23 17:36:17 UTC
There are some Phobos modules that, for different reasons, I'd like to see renamed:

std.stdio => std.io (commonly used, shorter, remove useless duplication of std).

std.bitmanip => std.bits (because bitmanip is a not nice abbreviation).

std.cover => std.coverage (not commonly used, to remember its purpose better).

std.regex/std.regexp => std.re (is enough, as in Python)

std.traits => std.meta
Comment 1 Andrej Mitrovic 2010-08-23 18:02:32 UTC
> std.stdio => std.io (commonly used, shorter, remove useless duplication of
> std).

Although I agree, this would invalidate pretty much all of the examples in TDPL (not to mention blow up the errata). If it were renamed, it would be good to introduce an alias to std.io in one way or another.

> std.regex/std.regexp => std.re (is enough, as in Python)

std.regex is fine imo. But why are there two modules?

> std.traits => std.meta

This is voted here: http://d.puremagic.com/issues/show_bug.cgi?id=3702
Comment 2 bearophile_hugs 2010-08-23 18:10:39 UTC
> Although I agree, this would invalidate pretty much all of the examples in TDPL

I think Andrei agrees with me about this change. I think Walter doesn't agree. I have written this bug report to have a place where to focus this (vague) discussion, regardless the final name decisions.

Until a book on Phobos is done (and maybe Andrei is writing it) Phobos is more free to change.


> But why are there two modules?

I think one of them is deprecated and will be removed, hopefully soon.
Comment 3 Masahiro Nakagawa 2010-08-23 20:48:09 UTC
(In reply to comment #1)

> 
> > std.regex/std.regexp => std.re (is enough, as in Python)
> 
> std.regex is fine imo. But why are there two modules?
> 

std.regexp is old implementation(as bearophile says, this module is deprecated). std.regex is Range-based implementation by Andrei.

See also:
http://lists.puremagic.com/pipermail/digitalmars-d/2009-February/050338.html
Comment 4 Austin Hastings 2010-09-24 08:36:58 UTC
std.stdio -> std.io : I disagree. I know what "io" means, and stdio is the opposite of it. There is an <io.h> and a <stdio.h> and they are different.

std.bitmanip -> .bits: Ambivalent. Shorter is not better, but there is a bunch of stuff in this file - bitfields, bitwise access to floats, bit vectors. Bits is a "truer" name than bitmanip, in this case, but it still isn't a very good name. The file probably needs to be split up.

std.cover -> .coverage: strongly agree.

std.regex -> .re : disagree. Regex is more searchable than "re", and a little more newbie-friendly.

std.traits -> .meta: This is another case where a bunch of stuff needs to be reorganized. There's a lot type-related stuff that should maybe get re-shuffled, either together or apart.
Comment 5 bearophile_hugs 2010-09-24 09:46:14 UTC
See also this post by L. T. Kyllingstad, "Phobos has way too many modules" :
http://article.gmane.org/gmane.comp.lang.d.phobos/2472
Comment 6 bearophile_hugs 2011-06-30 15:15:36 UTC
KennyTM~:

> But std.cover no longer exists in D2.
Comment 7 AndyC 2015-01-25 02:34:18 UTC
Closing: I'd guess this isnt gonna happen, the names are locked in by now.