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

What you can do is the opposite, integrate a “dynamic” type into a statically-types language, like C# does: https://learn.microsoft.com/en-us/dotnet/csharp/advanced-top...

This lets you use dynamic typing when you want, and enables more seamless interoperability with dynamically-typed languages.




Is it not literally the same on a type system level? Of course it could be very different from a user-perspective, as the ratio of `dynamic` will be very low in case of C#.


It’s not the same, because with “dynamic” the client code decides that it wants to use a specific object dynamically rather than statically, whereas with gradual typing it’s the object/class that decides that it now has (or hasn’t) type annotations. Aside from that, the default is reversed.




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

Search: