Maybe this is something the compiler could do without extending the syntax since, I far as I understood, "#(...) asByteArray" is always equivalent to"#[...]" Statically, the compiler could make the conversion. No? Alexandre On 30 Jan 2009, at 10:55, Lukas Renggli wrote:
so do I understand correctly that your point is to replace asByteArray by #[]
Yes, instead of writing
#( 1 2 3 ) asByteArray
you write
#[ 1 2 3 ]
Which is much faster and saves memory, as no conversion and no copying happens at runtime. All Smalltalk dialects (with the exception of GemStone) support this syntax. Pharo should have it too.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.