logoalt Hacker News

sfn42today at 10:04 AM2 repliesview on HN

C# has anonymous types which is pretty much the same thing. Though I prefer to declare actual types for most usecases, I'll only use anonymous types for intermediate results and such.


Replies

grumpyproletoday at 10:37 AM

I certainly don't mean to knock nominal types. But I think structural types are more fundamental. A language would only need a single "newtype" or "nominal" keyword to create nominal types from structural types.

show 1 reply
KellyCriteriontoday at 4:18 PM

Claude is "very good" in applying >var< continuously :-D