[m-rev.] for review: std_util__arg_name

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 24 15:39:37 AEST 2001


On 24-Sep-2001, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> > Adding std_util__arg_name for retrieving the field name (if any) of a
> > functor argument.
> 
> Before this becomes part of the language or standard library, I think we
> should consider whether or not it is really worth its cost.  Without this, I
> believe Mercury executables could strip out field names.  Once it's in, that
> becomes much harder, and in some cases impossible.  So is this feature
> really worth the executable-size bloat?

IMHO yes.

The number of field names per program is generally not large -- the
storage required is miniscule in comparison to PC memory sizes and small
even in comparison to the size of memory in modern embedded systems.

In the unlikely event that it really becomes a performance problem,
we can adopt the same solution that Ada uses: define a pragma,
e.g. `pragma suppress_field_names', whose effect is to remove the
field names from the RTTI; the scope could either be for all type
definitions in the containing module, or alternatively we could have
`pragma suppress_field_names(TypeName/Arity)' to have it apply just
to a specific type.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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