March 30, 2005
Walter wrote:
> "Trevor Parscal" <Trevor_member@pathlink.com> wrote in message
> news:d2e710$11s8$1@digitaldaemon.com...
> 
>>FOR getting rid of the annoying package/module problem
>>
>>This last one was the most dissapointing thing to me when learning D. I
> 
> feel
> 
>>like my code has to be organized in a way that I do not prefer, and when a
>>language takes that freedom from a programmer, that is a bad thing.
> 
> 
> I read your post, but I just didn't understand what the problem you're
> seeing is. Can you please try again?
> 
> 

I think he means the inability (sp?) of doing this:

/some/path/mylibrary.d
/some/path/mylibrary/foo.d
/some/path/mylibrary/bar.d

_______________________
Carlos Santander Bernal
March 30, 2005
Derek Parnell wrote:
> Truthfully, I don't really
> give a dam about the name. Its the content and structure that is much,
> much, more important. I'm not greatly swayed by the names people give to
> things, and the "Phobos" moniker has never brought to my mind the idea of a
> toy language or library. Actually, I think its rather clever. But like I
> said, call it whatever, and it'll still be its contents rather than its
> name.
> 

Totally agree.

_______________________
Carlos Santander Bernal
March 30, 2005
"Walter" <newshound@digitalmars.com> wrote in message news:d2ejt9$1geh$1@digitaldaemon.com...
>
> I understand your passion, but I respectfully disagree.  I just don't see
> it
> as unprofessional to give the standard D library a name.
>

Excellent, I'm happy to hear the final word.


March 30, 2005
Unknown W. Brackets wrote:
> Ehm?  Someone call?  I post here so little I'm surprised I was mentioned...

I'm sure he wants to hear as many voices as possible, but I'm fairly certain that "[Unknown]" was intended to be the name of the category (see also [Ambivalent], [Against renaming], etc.).

...
>> [Unknown] Anders F Björklund, Carlos Santander B, Sean Kelly, Walter, Benjamin Herr,  Georg Wrede, Trevor Parscal, everyone else


-- 
A. Nonymous
March 31, 2005
On Wed, 30 Mar 2005 12:45:20 +0000 (UTC), Trevor Parscal wrote:

> I am, for the record, despite the categoriztion of my view in a recent post.
> 
> FOR changing the name Phobos to something else.
> FOR keeping std as the namespace of the Standard Library
> FOR reorganizing things, a bit more structure
> and
> FOR getting rid of the annoying package/module problem
> 
> This last one was the most dissapointing thing to me when learning D. I feel like my code has to be organized in a way that I do not prefer, and when a language takes that freedom from a programmer, that is a bad thing.
> 
> I know we all just deal with it, but it can cause annoying problems, and I must suggest some alternative ideas of handling packages and modules.
> 
> Example Structure
> 
> [/] source
> ---[-] string.d
> ---[/] string
> ------[-] convert.d

I does seem odd to me too that DMD disallows a source file to have the same basic name as the directory its in. The file system handles this quite well so why DMD doesn't is still a mystery to me.

> 1: Automatic recursive module inclusion.
> This would cause "import string;" to import string.d and the contents of the
> string package, like convert.d. If you only wanted string.d, you would be out of
> luck, this is the downside...
> 
> 2: Manual recursive module inclusion.
> This gives you more control, but requires new language. For instance, "import
> string;" would only import the string.d module, but "import.string.*;" could
> grab the contents of the string package. Also, you can acutally say "import
> string.convert;" which you cant do with D right now, which sucks.

Another possible syntax for including an entire package, rather than just individual modules might be ...

   import package string;

Though why one would need to import an entire package is not clear to me.

> 3: Clarification of module vs package
> This would make it so you are using a different manner to include just the
> string module (string.d) or the entire string package (including string.d if
> present). So, "import string;" would include just the module, and "imports
> string;" does everything. I guess the naming could be different. Depends on
> whether you see "import module" as a command like "do this" or a definition like
> "type name". If the latter is your opinion, than imports makes sense, because it
> is the plurar version of import, however as a command, it's confusing, which is
> bad.
> 
> Other ideas on how to solve this problem are out there, and we should look at them too. All I know is it's really annoying to have to name things the way I have to. I think it breaks the object orientation concept when you cant have a module have submodues (string = module and string.convert = module)..

As I said above, I think that the problem is just that one can't have a source file with the same base name as the directory its in. Why not?

The way I see it,

 import string;  // means get the contents of "string.d"
 import string.convert; // means get the contents of "string/convert.d"
 import string.convert.russian; // means get the contents of
"string/convert/russian.d"

But DMD doesn't agree with me :-(

> Reorganizing things of course makes things break, but lets do it NOW while the code we are breaking is minimal.
> 
> Also, ideas other than phobos are not a bad idea. I mean, if you don't think that the D Standard Library being in the std namespace makes sense, that you could come up with SOMETHING more professional than Phobos.

Why is the collection of characters in the sequence 'P','h','o','b','o','s' necessarily unprofessional? I just don't get it? If it was generally recognised as a swear word then I could understand your concern. I know it is the transliteration of the Greek word for 'fear', but it is also the name of a moon - so what?

> Naming things IS
> important, even though it doesn't change the way the code works. I agree that
> Java's name stuck, but Java is at least a word in most people's vocabulary.

The people of Indonesia(the Javanese anyway) are very happy to have such
global use of their main island ;-)

> Finally, this forum system is pretty lame. I am glad it is here, but honestly, how hard is it to grab a copy of PhpBB? If Digital Mars doesn't want to make the upgrade, I would be glad to host a modern board on my own server... And if you think this board is fine, and wonder why I think it is lame, here are my complaints, that would all be fixed if you used a modern (FREE AND OPEN SOURCE) board like PhpBB.

I use a good news reader (40Tude) and have none (zero) of the problems you
mention below.

> 1: Posts take too long to show up
Instantaneous. No sooner do I press 'send' that the post is visible in the list.

> 2: Posts are not organized by topic
I can organize posts by topic, author, date, etc... at nearly instantaneous speeds. If you use Opera's news reader, there is almost unlimited ways to organise and categorise posts.

> 3: The interface is ugly
The web interface to DMD newsgroups is not great. But I never use that anyway.

> 4: Users cannot register and settings/identity be recalled
Using a news reader, you can.

> 5: No search tools
I have useful searching facilities in the news reader.

> PLEASE considder using a modern board! It would really help get questions answered, things decided, a community grown.

IMO, web based boards are generally a lot slower to use, more cumbersome, and less flexible.

-- 
Derek Parnell
Melbourne, Australia
http://www.dsource.org/projects/build/
http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage
31/03/2005 9:38:07 AM
March 31, 2005
On Wed, 30 Mar 2005 22:03:08 +1000, Matthew <admin.hat@stlsoft.dot.org> wrote:
> "Regan Heath" <regan@netwin.co.nz> wrote in message news:opsof7f4jz23k2f5@nrage.netwin.co.nz...
>> On Wed, 30 Mar 2005 21:06:38 +1000, Matthew <admin.hat@stlsoft.dot.org>  wrote:
>>>>> And I have to disagree with Walter's recent assertion (or maybe my   interpretation of it) that bug fixing in the
>>>>> language/compiler is more important than fixing Phobos. I think  unless  and until D has a good library that has
>>>>> been
>>>>> well
>>>>> and widely tested, it makes advances in and improvement of the   language/compiler somewhat moot. To me, they're
>>>>> 50-50,
>>>>> not 80-20 (or 70-30 or whatever figure might be induced from Walter's   post).
>>>>
>>>> I'm not with you here. In my recent experience, of having tried to  write  some "library" code using templates and
>>>> mixins, I found that until the  bugs/problems in the compiler are  resolved I cannot write the "library"  code in
>>>> the
>>>> way it "should" be written. At best I could produce something  that  worked in some hackish or ungainly manner. I am
>>>> loath to produce code  for a library that is hackish. It's what is  currently stopping me from  producing large
>>>> amounts
>>>> of code in D (that and spare time), every time I  get started I hit  these bumps in the road.
>>>
>>> Are you suggesting that your aims and experience - common to us all, I'm  sure - are representative of the broad mass
>>> of
>>> putative D users come a 1.0 release?
>>
>> I'm suggesting that before we can write a good library (standard or  otherwise) we need a solid bug-free compiler
>> which compiles everything the  spec suggests it should compile.
>
> And I'm suggesting that a concurrent approach is more sensible, and far more likely to lead to success for all concerned.

I agree that a concurrent or parallel approach is the most likely/sensible. However I think that the compiler is holding the library back, so needs to be improved *before* we can improve the library.

>>> That's the only really important audience, and if they're not catered  for, then D
>>> won't prosper.
>>
>> If D reaches 1.0, gets a lot of exposure and is not "ready" that will  likely harm it's chances of success at least in
>> the short term, long  term.. people are generally willing to give something a second chance.
>
> Don't follow. Can you rephrase?

By 1.0:
1. D needs a solid bug free compiler.
2. D needs a good standard library.

We all seem to agree here. But, we're not talking about being at 1.0 now, we're talking about how to get there. Logically it doesn't matter which you do first, so long as both are complete before 1.0. Realistically they will likely be done concurrently/in parallel (as you say), my experience is that #1 is holding #2 back, and therefore #1 needs to be improved before #2 can improve.

At the present time:
1. D's compiler has bugs, stopping me from writing my/a library.
2. D's standard library is piecemeal.

Regan
March 31, 2005
On Wed, 30 Mar 2005 03:54:15 -0800, David Barrett <dbarrett@quinthar.com> wrote:
> "Mike Parker" <aldacron71@yahoo.com> wrote in message
> news:d2e013$qls$1@digitaldaemon.com...
>> I guess then I should speak up, as I like the name Phobos. I would very
>> much hate to see it named to 'D Standard Library', even if you did somehow
>> persuade Walter to do so. I've never viewed Phobos as a codename, but as
>> the *real* name. That is, in fact, how it is presented in the
>> documentation. And did Walter ever say he intended it to be a 'codename'?
>> Anyway, I disagree completely with your reasoning and see the name Phobos
>> as a boon rather than a hindrance. It adds a bit of pinache to things.
>
> I'll admit, "Phobos" doesn't excite me.  But I'd be much happier if the name of the package and, well, the name of the package were the same.

I think this is where/why we disagree. (I use "we" loosely to mean myself and others who have voiced an opinion not to mind, or to like calling the "D Standard Library" Phobos).

--these opinions are my own, not 'we' as used above--

In my mind, "Phobos" is the name of something, this something is the "D Standard Library". The phrase "D Standard Library" is a description of what it is, "Phobos" is the name/short descriptor for it.

I see no reason to change "std" to "Phobos" or vice-versa, in my mind "std" is a package inside the library which is called "Phobos" i.e.

[Phobos]
  |-[std]
  |   |-string.d
  |-[etc]
  |   |-[c]
  |      |-recls
  |-? others may appear later

So.

Library == "Phobos"
Package == "std"

"Phobos" is a collection of packages, a library, not a package itself.

Just as "Ares" is a collection of packages, a library, not a package itself.

Regan
March 31, 2005
"Carlos Santander B." <csantander619@gmail.com> wrote in message news:d2f4dj$236r$7@digitaldaemon.com...
> I think he means the inability (sp?) of doing this:
>
> /some/path/mylibrary.d
> /some/path/mylibrary/foo.d
> /some/path/mylibrary/bar.d

To make that work would introduce a huge kludge into the symbol table lookup rules, as mylibrary would have to be *both* a module name and a package name, and disambiguating the two cases would likely be an endless source of weird bugs. It'd be like trying to make:

    int foo;
    void foo();

work.


March 31, 2005
On Thu, 31 Mar 2005 12:20:34 +1200, Regan Heath wrote:

> On Wed, 30 Mar 2005 03:54:15 -0800, David Barrett <dbarrett@quinthar.com> wrote:
>> "Mike Parker" <aldacron71@yahoo.com> wrote in message news:d2e013$qls$1@digitaldaemon.com...
>>> I guess then I should speak up, as I like the name Phobos. I would very
>>> much hate to see it named to 'D Standard Library', even if you did
>>> somehow
>>> persuade Walter to do so. I've never viewed Phobos as a codename, but as
>>> the *real* name. That is, in fact, how it is presented in the
>>> documentation. And did Walter ever say he intended it to be a
>>> 'codename'?
>>> Anyway, I disagree completely with your reasoning and see the name
>>> Phobos
>>> as a boon rather than a hindrance. It adds a bit of pinache to things.
>>
>> I'll admit, "Phobos" doesn't excite me.  But I'd be much happier if the name of the package and, well, the name of the package were the same.
> 
> I think this is where/why we disagree. (I use "we" loosely to mean myself and others who have voiced an opinion not to mind, or to like calling the "D Standard Library" Phobos).
> 
> --these opinions are my own, not 'we' as used above--
> 
> In my mind, "Phobos" is the name of something, this something is the "D Standard Library". The phrase "D Standard Library" is a description of what it is, "Phobos" is the name/short descriptor for it.
> 
> I see no reason to change "std" to "Phobos" or vice-versa, in my mind "std" is a package inside the library which is called "Phobos" i.e.
> 
> [Phobos]
>    |-[std]
>    |   |-string.d
>    |-[etc]
>    |   |-[c]
>    |      |-recls
>    |-? others may appear later
> 
> So.
> 
> Library == "Phobos"
> Package == "std"
> 
> "Phobos" is a collection of packages, a library, not a package itself.

Exactly how I would say it too! :D

Phobos is the name of the library that is distributed with DMD. 'std' is the name of one of the packages in that library (though I'd prefer 'core' but its too late for that). If we need standardization, it with the names of the packages and modules within the library, so that developers need not be (too) worried about changing D vendors.

-- 
Derek
Melbourne, Australia
31/03/2005 10:36:59 AM
March 31, 2005
On Wed, 30 Mar 2005 13:56:54 -0800, Walter wrote:

> "Carlos Santander B." <csantander619@gmail.com> wrote in message news:d2f4dj$236r$7@digitaldaemon.com...
>> I think he means the inability (sp?) of doing this:
>>
>> /some/path/mylibrary.d
>> /some/path/mylibrary/foo.d
>> /some/path/mylibrary/bar.d
> 
> To make that work would introduce a huge kludge into the symbol table lookup rules, as mylibrary would have to be *both* a module name and a package name, and disambiguating the two cases would likely be an endless source of weird bugs. It'd be like trying to make:
> 
>     int foo;
>     void foo();
> 
> work.

You slacker! ;-) What a cop out... You already decorate symbol names for object files, so why not decorate the internal symbols for packages and modules.

  import some.path.library;

uses symbols "some~P", "path~P", "library"

  import some.path.library.foo;

uses symbols "some~P", "path~P", "library~P", "foo"

   some.path.library.funcA();

uses symbols "some~P", "path~P", "library", "funcA"

   some.path.library.foo.funcA();

uses symbols "some~P", "path~P", "library~P", "foo", "funcA"

Even if my suggestion is absurd, I'm sure you can come up with something that is not stupid to implement.

-- 
Derek
Melbourne, Australia
31/03/2005 10:45:24 AM
1 2 3 4 5 6 7 8
Top | Discussion index | About this forum | D home