• [^] # Re: Représentations intermédiaires du compilateur OCaml

    Posté par . En réponse au journal Malfunction: réutiliser la représentation intermédiaire du compilateur OCaml. Évalué à 1.

    Merci ! Ça répond exactement à ma question. J'aurais du regarder directement là

    Dynamic languages, such as Scheme, Smalltalk or Javascript, are easy to compile to and have reasonably fast implementations. However, when running statically typed functional programs, time is wasted on runtime type checks.

    C'est l'argument clef qui met Lambda devant Scheme, en particulier il dit après

    it assumes its input to already have been proven safe
    by a high-level type checker. This makes it an ideal
    target for statically-typed languages with advanced
    type systems, since the safety of programs need not be
    explained to the backend.

    Cependant on peut quand même se poser quelques questions parce que ce n'est pas vraiment rassurant de lire ensuite :

    So, I conjecture that OCaml will not miscompile any Malfunction program, or at least that when it does, it will also miscompile a sufficiently contrived OCaml program.