[phobos] RFC: units type for D

David Simcha dsimcha at gmail.com
Wed Aug 25 19:31:00 PDT 2010


  I don't understand this argument.  If we're going to have a snowball's 
chance in Hell of winning over C#, Java or Python programmers en masse, 
we need a huge standard library.  I think we should fully commit to 
building one even if it doesn't happen overnight.  Of course the growth 
of it will look somewhat uneven initially, as people contribute whatever 
code they have available to Phobos and some things will temporarily seem 
out of place in a generally small standard library.  I don't see this as 
that big a deal, though, as long as the modules in question are fairly 
standalone modules that don't need to integrate tightly with the rest of 
Phobos.

On 8/25/2010 8:14 PM, Don Clugston wrote:
> On 26 August 2010 00:26, Benjamin Shropshire
> <benjamin at precisionsoftware.us>  wrote:
>> Hello Walter,
>>
>>> Benjamin Shropshire wrote:
>>>
>>>> I have offered up a library that supports statically encoding units
>>>> in the type system so as to prevent unit errors (adding distance and
>>>> time) and to enforce correct conversions all around.
>>>>
>>>> http://d.puremagic.com/issues/show_bug.cgi?id=3725
>>>>
>>>> I'm looking for comments: What's holding it back from inclusion? What
>>>> would need to be improved? The API? Better comments? (I haven't
>>>> tested it recently so; make it build again?)
> I have significant concerns about this, though not related to the code
> itself. It's an excellent test case for the template system, and it's
> something the language needs to be able to do. However, my feeling is
> that this is really quite niche. I've seen a few implementations of
> the idea in C++, but I've not seen much evidence that anyone actually
> uses it. I fear it might be a solution in search of a problem.
> Does it really belong in the core library?
> Partly this comes back to the question of how big we expect Phobos to
> eventually become. If it were already hundreds of modules, there
> wouldn't be much question. But to my mind, including this code would
> mean we're committing to an enormous Phobos. I don't think we're ready
> for that yet.
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>



More information about the phobos mailing list