Andrew Zonenberg on Nostr: Anybody else wish C and C++ had named function arguments like SystemVerilog module ...
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)
);
Published at
2025-11-25 15:24:56 UTCEvent JSON
{
"id": "63bcebb76ad388fac1d437ce9050857c7ace0fd7892577a8c62644459a1477a5",
"pubkey": "c35a8fae05a838b863707803bb1fdfcfcbb39adcf01ee1a9fc52ef44998ce4c0",
"created_at": 1764084296,
"kind": 1,
"tags": [
[
"proxy",
"https://ioc.exchange/users/azonenberg/statuses/115611028476509880",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub/"
]
],
"content": "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?\n\nfoo.bar(\n .baz(1),\n .foobar(\"hai\"),\n //foobaz is unspecified and gets a default value\n .asdf(42)\n);",
"sig": "4c9ac493eff31ba4421d85bff5a1c87c4e88bba5e2763e34b5e2df687b2605b8fc1d69d67bdaaafce8573757e02b346c6c35ca6f976b9562160e3ca70f61ee9b"
}