I think the main problem is that any VM written in a higher-level language will be too slow for practical use.

Take a good look at the performance of alternatives to C in the benchmarks at the GCS when doing VM like things.

In many, maybe most cases, C is left behind by compilers for languages like Haskell, Erlang, OCaml, SML, and my favorite Clean.

When you combine their deeply analysing and heavily optimising compilers, with their freeing the programmer from so much of the low-level housekeeping like memory management, using almost any of them to create a VM interpreter would be a win in terms of productivity.

It may be that you would want to hand code the dispatch loops and JIT compilers in C or even assembler--maybe--to squeeze out the final ounce of performance, but you retain those generated by the compiler/hll for debug and benchmark purposes.

C does can produce very fast compiled code--in the hands of exceptionally proficient programmers--but that performance comes at a huge cost in terms of productivity. Coding yet another set of memory management, allocation/deallocation infrastructure, debug and trace routines et al. And when things do go wrong it requires a special breed of immensely skilled and dedicated practitioners to investigate and track down the causes.

Most of us here recognise the benefits of using high(er) level languages with in-built memory management and revel in the freedoms that gives us. It seems silly to eshew those benefits for writing the vast majority of the infrastructure and kernel of a VM. Better to write in a HLL for reliability and productivity and reserve C for tuning the performance critical parts.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^5: Why Perl 6 is taking so !@#$ long by BrowserUk
in thread Why Perl 6 is taking so !@#$ long by dragonchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.