Bool setter for std.json
Stephan
Stephan at extrawurst.org
Tue Feb 25 00:07:27 PST 2014
On Tuesday, 25 February 2014 at 07:58:23 UTC, w0rp wrote:
> On Monday, 24 February 2014 at 22:33:52 UTC, ed wrote:
>> On Monday, 24 February 2014 at 19:20:23 UTC, Adam D. Ruppe
>> wrote:
>>> On Monday, 24 February 2014 at 18:57:53 UTC, w0rp wrote:
>>>> It really should just be "BOOLEAN" in std.json.
>>>
>>> yeah, or at least the getter property, I agree with that.
>>>
>>>> I don't mean to show off or anything dumb like that, but I
>>>> haven't used std.json for a while after I wrote my own
>>>> library,
>>>
>>> Aye, my jsvar works similarly ( though it actually uses
>>> std.json for the toJSON and parseJSON functions).
>>
>> I gave up on std.json and switched to the JSON type in vibed
>> which includes a nice prettyPrint as well. Not sure on the
>> performance of it though, never tested (never been a problem
>> either).
>>
>> Cheers,
>> ed
>
> vibe.d's JSON is pretty good. There are really two things I
> don't like about it.
>
> 1. It never throws when you try to get a type out of it, so
> you'll get float.nan for to!float if it's actually an array.
> 2. It has an "undefined" type, so it doesn't throw when you
> look for an index or key that isn't there, it uses the
> JavaScript behaviour.
>
> Those kind of put me off enough to make me write my own.
Actually that is exactly what I like about it! Performance of
exceptions in D is very bad and right now I am trying to reduce
using them wherever I can.
More information about the Digitalmars-d
mailing list