News for hackers. Stuff that matters.
Re:The Serde Rust Framework by Jweb_Guru on Thursday October 14, 2021 @10:58PM (#28873658)
I wrote a lot of Java back in the day. I elaborated on why I disagree in the other comment. I do not know if the situation in C# is similar.
Re:The Serde Rust Framework by Yacoby on Friday October 15, 2021 @12:54AM (#28874443)
For context, the example from the Serde wiki written in Java using Jackson

  public record Point(int x, int y) {}

  // [...]

  var objectMapper = new ObjectMapper();
  var jsonString = objectMapper.writeValueAsString(new Point(2,1));
It isn't obvious to me what advantage Serde offers that you couldn't get with Jackson or other similar libraries in Java (although I get that Java and Rust are different languages, and that there may not be something this ergonomic in the likes of C++)
Re:The Serde Rust Framework by Jweb_Guru on Friday October 15, 2021 @01:46AM (#28874712)
For that example there's no advantage. But it's really, really easy to find examples where there are (the simplest example is, anything with pointers with @NonNull annotations, or anything which is performance-sensitive and contains other objects).