Hacker News new | past | comments | ask | show | jobs | submit login

Which mainstream language supports anonymous structural types? C# is the only one that comes to mind and it's not a standard pattern AFAIK.



Wait a moment! Since when are we talking about only mainstream languages? And how is that even defined?

That's not fair play


Language features are a secondary consideration when compared to ecosystem and library availability as far as getting actual stuff done.

I never claimed those languages don't exist, but a language is a full package, and right now I'm not seeing even ascending languages as supporting trivial structural return types as an idiom. Granted, this is mostly a personal pet peeve given my observations and usage of code.


> I never claimed those languages don't exist

Yes you did. Let me quote:

Me: > Even for that there is no need for dynamic typing anymore. This problem has been solves with type parameters (aka generics) and type-classes.

This is obviously a general statement. I means "there can be a programming language where there is no need for dynamic typing to solve this kind of problem". And then I continue, that this problem has been solved. That means there is at least one such a language already existing which solves this problem with certain techniques.

Then you: > Not true.

And once I offer you a concrete implementation as an example, you suddenly change the topic to "but... no mainstream language". And if I would present you a language that could be considered as mainstream, I'm sure you would find another restriction such as "but this language does not have enough... libraries".

There certainly is no true Scotsman for you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: