3 ms·
Being able to work with "Any" implies either working with Strings (since you can encode anything in strings) or it implies a memory unsafe language (e.g. workin
by bad_user 9y ago
Being able to work with "Any" implies either working with Strings (since you can encode anything in strings) or it implies a memory unsafe language (e.g. working with void* in C) or it implies subtyping and hence an OOP language.
But OOP subtyping is already about solving polymorphic call sites at runtime. And because you carry a vtable around for every instance, thus objects being tagged with their classes, you can always do upcastings and downcastings. So OOP languages are already very dynamic on that scale and fairly unsafe.
No, you cannot do ": Any" in Haskell.
- tome 9y ago> No, you cannot do ": Any" in Haskell. https://hackage.haskell.org/package/base-4.10.0.0/docs/Data-Dynamic.html https://hackage.haskell.org/package/base-4.10.0.0/docs/Data-...
- tome 9y agoOn second thoughts I think kod used Any to mean something like Dynamic and bad_user assumed Any meant a top type, something like I believe Scala has.