>>>>> "Colin" == Colin Adams <
[hidden email]> writes:
Colin> What will the feature contents of immutable_string_general
Colin> be?
I hear no answer.
What is the timetable/implementation plan for this scheme?
Colin> 2008/6/3 Emmanuel Stapf [ES] <
[hidden email]>:
>> Hi Colin,
>>
>> Eric and I had a discussion regarding your READABLE_STRING
>> proposal. Although it addresses the performance issue with
>> substring it would not cope very well with existing code. For
>> example:
>>
>> s: READABLE_STRING
>>
>> io.put_string (s)
>>
>> would simply cause a conversion of `s' to STRING_8 and the
>> memory benefit is lost.
>>
>> Instead, we came up with the following hierarchy:
>>
>> deferred class READABLE_STRING_GENERAL end
>>
>> deferred class STRING_GENERAL inherit READABLE_STRING_GENERAL
>> end
>>
>> deferred class READABLE_STRING_8 inherit
>> READABLE_STRING_GENERAL end
>>
>> deferred IMMUTABLE_STRING_GENERAL inherit
>> READABLE_STRING_GENERAL end
>>
>> class STRING_8 inherit READABLE_STRING_8 STRING_GENERAL end
>>
>> class IMMUTABLE_STRING_8 inherit READABLE_STRING_8
>> IMMUTABLE_STRING_GENERAL end
>>
>> The same for STRING_32.
>>
>> The benefit is that it does not break existing code, and in
>> order to use IMMUTABLE_STRING_8 efficiently in FreeELKS, it
>> would be enough to use READABLE_STRING_8 whenever a STRING_8
>> was expected and guaranteed to not be modified. That way there
>> is no more conversion involved.
>>
>> The only negative aspects of IMMUTABLE_STRING_8 is that a
>> descendant of this class could add some routines modifying the
>> content of the string. A solution would be to mark that class
>> `frozen' but that would prevent someone to add its own
>> descendant in case IMMUTABLE_STRING_8 is missing some
>> functionality. Therefore we leave it as is (i.e. not frozen)
>> and will put a warning in the indexing clause to clearly state
>> the danger of inheriting from IMMUTABLE_STRING_8.
>>
>> Regards, Manu
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft Defy all
>> challenges. Microsoft(R) Visual Studio 2008.
>>
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ freeelks-devel
>> mailing list
[hidden email]
>>
https://lists.sourceforge.net/lists/listinfo/freeelks-devel >>
>>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Colin> Defy all challenges. Microsoft(R) Visual Studio 2008.
Colin>
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ Colin> _______________________________________________
Colin> freeelks-devel mailing list
Colin>
[hidden email]
Colin>
https://lists.sourceforge.net/lists/listinfo/freeelks-devel--
Colin Adams
Preston Lancashire
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel