[Parrot-users] VM target languages.

Peter Lobsinger plobsing at gmail.com
Sun Mar 6 21:00:36 UTC 2011


On Sun, Mar 6, 2011 at 7:00 AM, Bondor Sergiu <kr4sus at yahoo.co.uk> wrote:
>
> I have a task to build a statically typed programming language.I would like to use an existing bytecode and virtual machine as the target platform of my language. The question would be wheather Parrot VM is a good choise or should I consider better the Java VirtualMachine and java bytecode, which is specifically desined for statically typed languages. From what I've read , Parrot is only well suited for dynamically typed languages, so I'm assumming that it could be possible to build my language for Parrot but it would be inneficient.

The JVM was designed for a language which happens to be statically
typed. It was not designed for statically typed languages.

If your statically typed language happens to Java, or something very
similar to Java (the world needs yet another Java? really?), then the
JVM is definitely the way to go. If your language happens to do more
interesting things which don't really have equivalents in Java, such
as continuations, multiple inheritance, etc, you'll find yourself
working very hard to emulate these. That's not to say that such
features cannot be emulated. Many alternate JVM languages do exactly
this quite successfully.

Parrot offers a dynamic type system built in, but is designed to be
quite flexible. It has, for a long time, been designed for multiple
language implementations to interoperate. It offers more features than
your staticly typed language likely cares to use. You will, however,
not get much support from the existing compiler infrastructure for a
type-checker; but you'd probably want to roll your own anyways for any
halfway interesting language.

It all depends on what you want out of your language, and what work
you want to do to get there.


More information about the Parrot-users mailing list