[Yhc] Some suggested changes to Yhc.Core
Thomas Shackell
shackell at cs.york.ac.uk
Tue Aug 7 07:27:10 EDT 2007
Malcolm Wallace wrote:
> Actually, I think it would be better just to add the single new name
> "javascript". It's pretty easy, and allows us to represent the
> convention using an enumerated type internally, rather than just a
> String. Types are one of the reasons we like Haskell, aren't they?
I disagree :-) Enumerated types are a sensible choice for a closed set
of values, but the possible calling conventions that people might want
when using Yhc Core as a back-end is not a closed set.
I think it would be a really handy feature that people implementing
their own back-ends for Yhc Core can define and use their own calling
conventions without having to modify the yhc compiler at all. I feel
that losing a very small amount of type safety is a price well worth
paying for this :-)
The loss is particularly minimal because there is already an (Other
String) calling convention defined in Syntax.hs ;-)
Cheers
Tom
More information about the Yhc
mailing list