[squeak-dev] Clashing semantics for #asCollection between Stream parser(S) and MaClientServer

tim Rowledge tim at rowledge.org
Tue Aug 13 00:23:31 UTC 2019


I just loaded the Xtreams and Levente's GoogleWikiCompiler into an image that already had Chris' MaClientServer package. 

Running the GoogleWikiCompiler example failed! Oh noes!

Turns out that in GoogleWikiCompiler>LinkShort: the use of 
address, '.html'
to merger a collection of characters with the string '.html' relies on the implementation semantics of #asCollection to leave a String as a String - after all, it's a collection of characters, right?

However, Chris has changed that for MaClientServer such the String is returned as 
Array with: theString
which doesn't play nice with the above.

I'm not entirely sure I like either approach really; #($a $b $c) , 'foo' doesn't seem like such a great thing to do, especially if you can't guarantee what the actual state of the 'address' object is (that's a bigger issue around the parser behaviour) BUT 'foo' asCollection -> #( 'foo') doesn't seem quite nice either. I could sort of appreciate 'foo' asCollection -> #($f $o $o) I suppose.

The immediate solution within the context of the swiki parsing is to carefully make sure the address is actually a string, so no major issue for me today, but this does indicate a potentially problematic perplexity when mixing xtreams and client server packages. 

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- VISA LA FRANCE - Don't leave chateau without it




More information about the Squeak-dev mailing list