More radical ideas about gc and reference counting

HaraldZealot via Digitalmars-d digitalmars-d at puremagic.com
Tue May 6 01:36:18 PDT 2014


> That experimental package idea that was discussed months ago
> comes to my mind again. Add that thing as exp.rational and
> have people report bugs or shortcomings to the original
> author. When it seems to be usable by everyone interested it
> can move into Phobos proper after the formal review (that
> includes code style checks, unit tests etc. that mere users
> don't take as seriously).
>
> As long as there is nothing even semi-official, it is tempting
> to write such a module from scratch in a quick&dirty fashion
> and ignore existing work.
> The experimental package makes it clear that this code is
> eventually going to the the official way and home brewed stuff
> wont have a future. Something in the standard library is much
> less likely to be reinvented. On the other hand, once a module
> is in Phobos proper, it is close to impossible to change the
> API to accommodate for a new use case. That's why I think the
> most focused library testing and development can happen in the
> experimental phase of a module. The longer it is, the more
> people will have tried it in their projects before formal
> review, which would greatly improve informed decisions.
> The original std.rationale proposal could have been in active
> use now for months!

+1

The same idea came to my mind yesterday too (that signalize that 
isn't void idea).

And GNU/Linux community has proof that such model works. I mean 
Archlinux as example (but as I think other example exists). There 
are core, extra, community repositories and AUR (arch user 
repository). Today AUR contains 48489 packages and 11814 of which 
are orphan. But even orphanity isn't a sign of useless. 
Possibility to write PKGBUILD and place it in AUR has everybody 
and it is not such difficult. Only small part of these package 
goes to official repository, but this part EXISTS. And in my 
opinion this is the most rapid way for evolution. For example 
archlinux has the best support of D language through abundance of 
linux distributives (http://pastebin.com/tPKWS4ga and this is 
official repositories not in AUR). Oh, I've forgotten to mention 
all sorts of testing repositories.

And D community have all means for evolute such way. We have dub 
and http://code.dlang.org/. It rests to do a little: create 
package (in D sense) which will contain packages that installed 
through dub; and some UI to vote, orphan and adopt package.

There are example as how that I see:

On http://code.dlang.org/ we can found  package "rationals" (for 
example) with mark expstd. Than we install package with dub to 
some environment (it may be fakeroot, peruser import path or even 
perproject directory (the last likes me the least)) and address 
this package as "import expstd.rationals;" in our D projects. 
It's were good when dub or code.dlang.org counts installation. 
When some package counts enough installation and enough history 
(includes bug tracking), it become candidate to include in 
phobos. All trusted users (in therm of Archlinux) receive strong 
signal about and one of them review such package and become its 
auxiliary  comaintainer. No one package can exist in official 
repository without maintainer.

And some words about why "expstd". I think that with such package 
model comes time to add not only phobos in "namespace". There are 
many useful libraries which may not become part of phobos (linear 
algebra for example, or even GUI bindings), but should have some 
standardization and  highway to distribution. I suggest package 
"extra" (in D sense) and "bind" (for deimos and perhaps not only 
deimos packages). Naturally they start their life as "expextra" 
and "expbind". In the future we will need some other package (in 
D sense), but for start that three are enough.

As Andrei said "acta non verba". I promise that I make all, 
considering my life environment, to help and start this project.

P.S. This theme will become independent. And this is yet another 
one argue, that forum forms not ideal to represent news and 
current state of community. Important things sink often in other 
topics.

P.P.S. My apologies for my poor English.


More information about the Digitalmars-d mailing list