color lib
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 6 20:37:16 PDT 2016
On 7 October 2016 at 12:55, Manu <turkeyman at gmail.com> wrote:
> On 7 October 2016 at 12:38, Manu <turkeyman at gmail.com> wrote:
>> On 7 October 2016 at 12:25, Chris Wright via Digitalmars-d
>> <digitalmars-d at puremagic.com> wrote:
>>> On Fri, 07 Oct 2016 11:42:08 +1000, Manu via Digitalmars-d wrote:
>>>> I think throwing is the precedented action in that failure case...
>>>> what would you suggest?
>>>
>>> In C# 1.0, the standard pattern was to throw on errors. Later, they
>>> revised their preferred mechanism and started offering methods like:
>>>
>>> static bool TryParse(string str, out DateTime dt) {...}
>>
>> Indeed, but what should WE do?
>
> I've rolled with:
> bool colorFromString(Color = RGB8)(scope const(char)[] str, out
> Color color) pure nothrow @safe @nogc
More updates and doco tweaks pushed.
More information about the Digitalmars-d
mailing list