[m-rev.] field syntax (was: smart recompilation)
Peter Schachte
schachte at cs.mu.OZ.AU
Thu Jul 5 00:52:45 AEST 2001
On Wed, Jul 04, 2001 at 01:28:55PM +0200, Peter Ross wrote:
> Simon wrote:
> > On 04-Jul-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > > For one thing, it makes the .NET mapping nicer, as we can generate a get
> > > and set property for foo = and foo :=
> >
> > .NET should be irrelevant to this discussion. We should not be
> > designing high-level language features based on implementation
> > details of one of the back-ends. That sort of thing is what
> > pragmas are for.
> >
> I disagree, we should use the appropiate mapping of a mercury feature to the
> back end feature. Currently this is not possible on the .NET backend
> because we have no way of distinguishing between a normal function and a
> function which represents a `get' field access.
I think Simon's suggestion of a pragma is better. I cringe at the thought
of using the spelling of a function name to determine what sort of back end
code to generate for it. It's just too reminiscent of FORTRAN deciding
whether a variable is int or float based on its first letter, or BASIC
deciding it's a string if it ends with a $. Too many times have I spent
hours trying to figure out why something wasn't working, and finally, in
desparation, changed the name of something to to discover the system had
some peculiar rules for certain names.
--
Peter Schachte <schachte at cs.mu.OZ.AU> We must not think that computation
http://www.cs.mu.oz.au/~schachte/ ... has place only in numbers.
Phone: +61 3 8344 9166 -- Thomas Hobbes, 1655
Fax: +61 3 9348 1184
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list