[Grace-core] Modules & Inheritance
James Noble
kjx at ecs.vuw.ac.nz
Wed Oct 17 22:49:28 PDT 2012
> It's so nice to hear people talking about good code, about Self idioms!
well I like it! :-)
> 1. Won't it eventually be desirable for the dialect declaration to do
> something other than add more symbols?
short answer: not at this stage -
it should be possible, but we don't intent to contort the basic model
to support e.g. lazy evaluation.
> 2. Stylish source code will never change the dialect at a fine-grained
> level. That is, it would make code an unreadable puzzler, especially
> for students, if it included three different dialects in the span of
> twenty lines of code.
Hmm, probably. I have some odd ideas about dialect - e.g. you could
imagine a dialect for writing FSMs, another dialect for writing test cases,
and those could be commingled. But again, that's an advanced use,
and shouldn't contort the basic model.
> If those ring true, then a promising approach is to make the dialect
> designator specific to a "compilation unit", which in typical Grace
> implementations would be a file.
Yep. I think that's something we do agree on!
> Equally good would be to associate the dialect with some larger unit
> of code than a compilation unit, but is there one?
not as far as we've got, no.
James
More information about the Grace-core
mailing list