[Haskell-cafe] Compilers: Why do we need a core language?

Jacques Carette carette at mcmaster.ca
Fri Nov 23 14:43:17 CET 2012


On 22/11/2012 7:37 PM, Richard O'Keefe wrote:
> On 23/11/2012, at 1:56 AM, Jacques Carette wrote:
>
>> Actually, here I disagree. It might be much 'easier' for the 
>> programmers to do it for a small core language, but it may turn out 
>> to be much, much less effective. I 'discovered' this when 
>> (co-)writing a partial evaluator for Maple: we actually made our 
>> internal language *larger*, so that we could encode more invariants 
>> syntactically. This ended up making our jobs considerably easier, 
>> because we did not have to work so hard on doing fancy analyses to 
>> recover information that would otherwise have been completely 
>> obvious. Yes, there were a lot more cases, but each case was 
>> relatively easy; the alternative was a small number of extremely 
>> difficult cases. 
> I don't think we do disagree.  We are talking about the same thing:
> ``not hav[ing] to work so hard on doing fancy analyses''.
> The key point is that an (abstract) syntax *designed for the compiler*
> and a syntax *designed for programmers* have to satisfy different
> design goals and constraints; there's no reason they should be the same.

I must have mis-interpreted what you said then.  We definitely agree on 
this key point.

Jacques





More information about the Haskell-Cafe mailing list