Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
afaIk05dThe short answer: C++ provides more granular, "leaky" abstractions, while Rust provides higher-level, "sealed" abstractions.
The Verdict: Rust doesn't necessarily have more layers, but its layers are thicker. They do more work (checking safety, lifetimes, and concurrency) than the equivalent layers in C++. -
except if you serde hashmaps into json format then you gotta make your own keying system
-
@12bitfloat I‘m curious if the 3rd party lib from Newtonsoft is still the de facto standard for json serialization in C# 😅
But I can relate:
In Swift you just conform to Encodable/Decodable and the struct is ready to go for whatever serialization format that you like. -
@afaIk it‘s not even relevant if it‘s true because it‘s about a different topic.
Not only did it compare the wrong languages but it also talked about abstractions and safety, which is not directly related to the topic of serialization.
Useless pseudo intellectual crap. -
@Lensflare The current project I'm working on just uses System.Text.Json.Serialization and .. it honestly works pretty well. With the right annotations on my models, it seems to get everything right. It looks like we're still using Newtonsoft though in parts of the project. I think anything that has to write to Mongo needs to use it as that's their drivers JSON library .... and yes we use Mongo and it's as terrible as it sounds. 😩
-
@djsumdog for a sec in confused Mongo with Mono. Seriously, did someone ever used Mono professionally? Banshee (the mp3 player) was written it iirc. Also, it had some beautiful ide iirc. Very top notch in comparison with others. They did do effort in trying to make it successful.
A while ago I was doing dotNet development on my Linux machine and I like C# but then, when I build my project I get so much shit with it and I didn't know what was important and whatnot and decided it was too much garbage for me. Also, after some ninja stuff a single binary WAS possible. Right? RIGHT?
@djsumdog what is your opinion on the Nim programming language? I'm spending time with it and I like it so far. I was warned for immaturity but do not feel that at all actually. -
@jestdotty HashMaps work perfectly fine in serde. Unless you need ordered "VecMaps"... don't ask me how I know lol
-
@Lensflare Can you derive them in Swift? I.e. let the compiler give you a default impl (optionally with some extra annotations on fields for specializing it a little)
-
-
@whimsical I've heard of Nim, but never really looked into it. Just looking at the website, I see that it seems to have Python-like (whitespace) syntax?! I love Python and I really hate semicolons ... but Python really isn't good as a system programming language. I might need to look into this.
I wrote this in Mono back in the day:
https://github.com/sumdog/...
I really liked C#/Mono, but Gtk# stopped being maintained and it just became a hassle to keep it running, so I rewrote it in Python for mpv:
https://gitlab.com/djsumdog/... -
-
@12bitfloat yes you just derive the struct from Codable and the compiler synthesizes everything for you.
Customization can be done either via annotations on particular properties or via the serializer for overall rules like casing. -
@djsumdog Summit Khanna, sounds like something you can order at a Dutch coffeeshop when the White Widow is sold out. I wouldn't know, only amphetamine here.
I like the tree.cs.
You're an inspiring developer with your blogs and projects. Doesn't it feel lonely often? I often feel like I'm the only one left in my environment still loving the scene. -
@whimsical I don’t have anything bad to say about Mono. Which is a compliment already.
Xamarin however, what a shit fest! -
@Lensflare sure, everything comming from you is considered a compliment. I've noticed that you didn't upvote my nice comment to doggii man. Is that personal? Asking for a friend.
Ik sta biertjes om elf uur ochtends achterover te klappen op mijn prive strand. Het leven is zo mooi als je niet Duits bent.
(L). -
@whimsical
> sure, everything comming from you is considered a compliment.
It’s most certainly not! 😅
> I've noticed that you didn't upvote my nice comment to doggii man. Is that personal? Asking for a friend.
Doggii man? Do you mean kiki with the hotdog comment? I think I did ++ that.
Not that I need to explain myself when I don’t ++ ^^
Related Rants

How do you even come up with shit like this?
I found such a treasure today in the production code.
Man, I always miss Rust whenever I'm using another language ;_;
Exhibit A: Serialization and deserialization
With serde in Rust you just derive the Serialize/Deserialize trait with a simple annotation and now you can magically serialize/deserialize the struct with any serde backend, whether JSON, YAML, some binary format, whatever
Currently doing C# and I just want to cry ;_;
rant
rust
c#