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

Re: lists in enclosed expression

This page is part of the web mail archives of SRFI 108 from before July 7th, 2015. The new archives for SRFI 108 contain all messages, not just those from before July 7th, 2015.

Per Bothner scripsit:

> For Kawa I'm considering allowing '"@" expression' in general
> application context.  Thus: (fexp @aexp) would be equivalent to:
> (apply fexp aexp) except aexp can be a list *or* a vector.

A newbie asked something in #scheme which led me to wonder why we don't
let (a b . c) mean (apply a b c) in Scheme code.  After all, we got rid
of `funcall` by treating the head of a procedure call uniformly; why
can't we get rid of `apply` by treating the improper tail of a call

Alas, that means the tail can't be a combination, only an identifier or
a constant, since (apply x (foo bar)) can't become (x . (foo bar)).
Oh well.

> Another issue is the interaction with format specifiers.

I personally detest these: I much prefer Alex Shinn's fmt library
<http://synthcode.com/scheme/fmt> and hope it becomes the formatting
solution for R7RS-large.  Much cleaner, more Schemey, and easier to
extend coherently.

> I'm leaning towards deferring the issue to a separate SRFI to handle
> $splice$ more generally.

Given these complications, I'm inclined to agree.

Business before pleasure, if not too bloomering long before.
        --Nicholas van Rijn
                John Cowan <cowan@xxxxxxxx>