Maximilian Wilson wrote:
On 12/11/05, *Björn Hägglund* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
wrote:
> Ultimately, though, I don't think functors are the way to go for
making
> objects. I'm too worried about overhead, and functors don't
really seem to
> be designed for creating objects so much as modules.
Yes, you are probably right. I was actually just looking for nicer
syntax to
provide ADT:s in the style described. But it seems that functors
are not
able to the job. I think I'll simply continue to use lexical
closures, then.
Have you played around with Gump? The CTM book suggests in several
places that sufficiently-common idioms be given linguistic support,
and I've heard people on this list suggest that e.g. some kinds of
operator overloading (arithmetic on imaginary numbers) are best done
with Gump rather than extending Oz itself, but I've never gotten deep
enough into Gump to figure out how to do it. I think it would be very
cool to create new linguistic constructs purely from a grammar and a
translation into core syntax; but I don't really know how you'd
approach it. I understand the compiler parses text and not abstract
syntax trees, so you couldn't just use gump to parse the text and then
feed a modified AST to the compiler; I'm not sure how you'd do it.
Actually you can feed the compiler an AST, look in
http://www.mozart-oz.org/documentation/compiler/node4.html#label16
for setFrontEnd(+ParseFileP +ParseVirtualStringP)
Yves
Max Wilson
--
Be pretty if you are,
Be witty if you can,
But be cheerful if it kills you.
------------------------------------------------------------------------
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users