Phobos 2

Brad Anderson via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 1 11:40:05 PDT 2017


A (surely controversial) idea popped into my head while talking 
in #d on Freenode. The C++ guys are making an STL2 (the highlight 
of it being that it is range based). What about taking all the 
lessons learned from Phobos and creating a Phobos 2? It wouldn't 
replace the current version. You could import either in one 
program. It also wouldn't be a radical redesign. Most of Phobos 
could be used as is. What it would do is allow fixing some hard 
or impossible problems without losing backward compatibility.

We could do away with auto-decoding. Design it around using 
Andrei's allocators throughout. Make the GC optional from the 
start. Fix a few important naming conflicts and discrepancies.

There are problems, of course. Rampant code duplication is 
probably the biggest (though maybe public imports of identical 
code would help a lot).

I don't really expect this to go anywhere but I am curious to 
hear what changes you'd all like to see made to Phobos that can't 
happen because of backward compatibility. Also, how would you 
approach doing this? An on disk copy of Phobos with changes would 
not be an acceptable approach, I think.


More information about the Digitalmars-d mailing list