News for hackers. Stuff that matters.
Re:D is being used for autonomous driving research – Audi an... by nicoburns on Monday June 24, 2019 @10:19PM (#20270610)
You might be surprised how good Rust is ops-wise. Unit testing sipport comes out of the box, and it's hard to beat a static binary for deployment (compile times are a pain for CI though).

Rwgarding C#, that language and core tooling is indeed pretty nice. But I was surprised to find the library ecosystem quite lacking in some places. Basic things like JSON (de)serialization seemed pretty clunky, and the long tail of libraries I expect coming from the JS/PHP ecosystems seemed to be pretty non-existent.

Re:D is being used for autonomous driving research – Audi an... by Const-me on Tuesday June 25, 2019 @12:34AM (#20271213)
> Basic things like JSON (de)serialization seemed pretty clunky

The built-in one is.. strange.

Newtonsoft.JSON is _the_ most downloaded third-party library for .NET: https://www.nuget.org/stats/packages I like it, very flexible, in a good way.

Re:D is being used for autonomous driving research – Audi an... by tomschwiha on Tuesday June 25, 2019 @05:25AM (#20272414)
There will be a new JSON API in .NET Core 3.0: https://devblogs.microsoft.com/dotnet/try-the-new-system-tex...
Re:D is being used for autonomous driving research – Audi an... by nicoburns on Tuesday June 25, 2019 @10:39AM (#20274645)
I found it not very flexible compared to Rust's Serde (https://serde.rs/), which is my only comparison in statically typed languages. Customising things like mapping camel case to snake case required creating whole classes.
Re:D is being used for autonomous driving research – Audi an... by Const-me on Tuesday June 25, 2019 @11:15AM (#20275064)
> Customising things like mapping camel case to snake case required creating whole classes.

The class for that is built-in: https://www.newtonsoft.com/json/help/html/NamingStrategySnak...

The implementation only overrides a single virtual method, ResolvePropertyName https://github.com/JamesNK/Newtonsoft.Json/blob/master/Src/N... so if you want some other convention, it’s very easy to create a custom class for that.

Looks easy enough to me.

I never actually used that part. I prefer to use names from JSON. Or if the JSON schema is really bad, specify JSON names manually with attributes, like this:

    [JsonProperty( "json_property_09123" )]
    public string MagicProperty;
This way searching source code for a JSON name finds C# class serializing that property. Makes working on the code much easier, IMO.