News for hackers. Stuff that matters.
Re:C's designated initializers give us named arguments by sorrywhat on Thursday November 19, 2026 @11:05AM (#50561901)
That doesn't stop the C++ committee from doing the obvious, trivial and correct thing.

  Point foo = {
     .y = foo(),
     .x = bar(),
  };
calls foo(), sets x to it, calls bar(), and sets y to it. And

  Point foo = {
     .x = bar(),
     .y = foo(),
  };
calls bar(), sets x to it, then calls foo(), and sets y to it.

I'm sure you can give me the reason they didn't do that, and it will be something like "this conflicts with LRR-value warp semantics when invoked from concept inside a consteval coroutine" or something equally stupid, but the problem is I don't care. This is a good piece of syntax sugar (and the only reason I use C++20) and it's being handicapped by insane features that I don't use and don't care about.

Re:C's designated initializers give us named arguments by pjmlp on Thursday November 19, 2026 @11:24AM (#50562161)
International standards aren't made for a single person.
Re:C's designated initializers give us named arguments by radiospiel on Thursday November 19, 2026 @01:25PM (#50563987)
I am pretty sure that the execution order of the calls to foo() and bar() is not specified, regardless of how you want to order the assignment.
Re:C's designated initializers give us named arguments by jbarberu on Friday November 20, 2026 @04:44AM (#50572368)

    Point foo = {
       .y = foo(),
       .x = bar(),
    };

    calls foo(), sets x to it, calls bar(), and sets y to it. And
I think you meant the other way around...