Colin Paul Adams wrote:
>>>>>> "Eric" == Eric Bezault <er...@go...> writes:
>
> Eric> For those who are interested in the progress made in the
> Eric> Gobo compiler, I just committed support for once manifest
> Eric> strings. It was already supported by the front-end
> Eric> (i.e. gelint) but not by the C code generator.
>
> Eric> Now it looks like all Eiffel compilers currently supported
> Eric> by the Gobo project can deal with once manifest
> Eric> strings. Therefore I think it is OK to use them in the code
> Eric> of Gobo library classes.
>
> What's the syntax for this? Can you give an example please?
print (once "gobo")
It's equivalent to:
print (some_internal_name)
with:
some_internal_name: STRING is "gobo"
In other words, it's a manifest string that is not created again
and again at each call.
That's something that had been introduced in ECMA Eiffel to
reconcile the old divergent semantics of manifest strings
by SmartEiffel and ISE Eiffel.
--
Eric Bezault
mailto:er...@go...
http://www.gobosoft.com
|