2025-11-25 15:28:56
Anybody else wish C and C had named function arguments like SystemVerilog module ports, and allowed you to default-value an optional argument in any position?
foo.bar(
.baz(1),
.foobar("hai"),
//foobaz is unspecified and gets a default value
.asdf(42)
);
Pero qué fantasía es esta https://github.com/google-gemini/gemini-cli/issues/16750
Wishing C had the ability to do compile-time polymorphism.
Like, I have base class Foo with Bar/Baz derived from it.
I want to be able to put a method DoSomething() in Foo and call it on a Bar or Baz object in a template, without putting a vtable in Foo or incurring the overhead of a virtual method call.
You can sort of get this effect by having Bar/Baz be separate classes with no common base and make the template just call T.Foo() for parameter T, but this eliminates som…