digitalmars.D - three D nitpickings... (resurfaced)
clayasaurus <clayasaurus gmail.com> writes:
#1) With gdc on the horizon, woudln't it be more correct instead of just version (linux), have version(unix) which would cover BSD & Mac. or maybe have version(linux) version(MacOSX) version(BSD) etc... Are the versionings going to be left up to the compiler writers, or will there be a standard set (spec? i guess) for versioning on other systems. the D website says "Others will be added as they make sense and new implementations appear." would it make more sense to define them now so that when MacOS does happen, compiler writers now what version(what) to use? Now that I think about it, version (unix) would probably be too ambiguous. #2) This was brought up in another thread (can't find it ATM). Anyway, I like the idea of all imports being private by default, and if you want to make them public you use a public keyword like... public import foo; I think that having all imports public by default is messy and leads to things like import conflicts (which are really hard to track down on large projects) and definitions which seem to come out of nowhere. For example, before I privatized my imports, I could usually write writefln("anything"); without ever importing std.stdio; in the current file. While it may be less typing, it ultimately leads to confusion of where the function came from (in large projects, like libraries, that users are not familiar with). Yes, I know I can privatize my imports and I did, but I think it should be default behavior. #3) One thing that's a slight annoyance with phobos are imports like import std.stdio; and import std.stdint; why not just do import std.io; import std.int; ? It is less typing and looks cleaner, a win win. Ok, I know Walter has more important things to work on (bugs), but I thought I'd just resurface all this to make me feel better. *ahh* *peace-of-mind* PS. <subliminal>add loader.d to libphobos.a</subliminal>
Aug 22 2004
Stephen Waits <steve waits.net> writes:
clayasaurus wrote:#1) With gdc on the horizon, woudln't it be more correct instead of just version (linux), have version(unix) which would cover BSD & Mac. or maybe have version(linux) version(MacOSX) version(BSD) etc...
Or how about adding "version(Posix)" since most of those OSes strive for Posix compliance? --Steve BTW - you cannot (legally) call Linux (or any Linux-based distribution) "Unix". It's not Unix. Same goes for FreeBSD, OpenBSD, or NetBSD. Not that I care, but somewhere there is a lawyer who does care...
Aug 23 2004