[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Legacy caar to cddddr



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

On 10/20/2011 01:18 AM, Alex Shinn wrote:
> On Sun, Oct 16, 2011 at 11:44 PM, Jussi Piitulainen
> <jpiitula@x> wrote:
>>
>> Do all these need to remain in the language? In (scheme base)?
> 
> We should put them somewhere for compatibility, but
> I definitely think everything but the one and two depth
> combinations should be removed from (scheme base).
> Their use is generally a code smell.  People should
> use destructuring, records, or SRFI-1 first..tenth accessors.
> 

The historic use of these entities was as accessors for
structured aggregates implemented with cons cells.  In
a language that directly supports records, they have a
reduced mission.

It was possible to implement a general macro version (that
parsed the token and expanded it as far as necessary) of
the "c(a|d)+r" operators using the old "explode" and "implode"
commands to destructure the symbol itself, but those have
been eliminated since, I think, R4RS. And I don't think it
would work with current macrology anyway.


				Bear

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOoFTeAAoJEAOzWkqOibfNqhcIAKEXGifVrBtWaqbEk0gCRj8M
nASe3L9o1hPeP1Xia8ffVcXu5gSP0ArxZk9abtRMevODYVggJThzRec05NwBRhxs
KbkdD0WEapjF9cz8sUsMRh6EZZqimSsLs0b79i5VR5zgcmxoyHgI9FalIWznxmkB
OvxZtj6yg0sl6TIV0J0pEPo+sKJ+aP46WFkAfuokWX0Aohqpt26crBBmsovHysKW
2BLfOHXePI2jmpK6tw+6jWPeu/UtTyQEbpqf0YqdeYoM2WIBK4FsoB0YqvywuPIJ
MakKDARSfw2+Ead8szwV58YUWKrHyI1S2LDwDzJxDi4Fby7bpdO3nFpDAaZhnaA=
=Kse0
-----END PGP SIGNATURE-----

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports