سؤال

Can you create a statically typed language in Parrot VM or does it have to be dynamically typed?

هل كانت مفيدة؟

المحلول

Yes, you can, though neither the performance characteristics nor the tool chain is optimized for statically typed languages.

For example if your program has a dependency on another module, you will need to load that module at compile time, and somehow extract the type declarations and signatures in there. You'll need to do much of that (storing and then retrieving the type information) on your own, parrot doesn't offer any convenience methods for that.

نصائح أخرى

You surely can create a statically typed language above a dynamically typed implementation (but not using the dynamic typing facilities).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top