Array literal syntax

Brian Rice water at tunes.org
Fri Dec 16 12:48:16 PST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here's an overview of array literal syntax in Slate right now, mostly  
Squeak-derived:
{} -> produces a regular Array with the evaluated contents as elements.
#{} -> does the same, only at compile-time.
#() -> produces an array with the literal-reading of all symbols  
within, e.g.
#(foo 3.4 . 8 'fi' #(1 2)) is the same as {#foo. 3.4. #'.'. 8.  
'fi' {1. 2}}

It occurred to me that ByteArray literals might be useful. Any  
comments or suggestions on that?

Smalltalk does #[] for that, but for us, that's compile-time  
evaluation of a block. Generally, we use #- prefix to denote compile- 
time evaluation.

- --
- -Brian
http://tunes.org/~water/brice.vcf

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDoygYPVkAvLW1zf4RApc7AJ0bf4+URPts2NW3OQvf1AdznlVFowCePeJS
AI0F3ewGSYBRHYQIxBKQJ8I=
=3Gkt
-----END PGP SIGNATURE-----




More information about the Slate mailing list