Re: [sawfish] Re: The dark corners of rep

Eli Barzilay <eli barzilay org> writes:
> In any case, that's another rep difference from Scheme -- it provides
> both `rplaca'/`rplacd' and `setcar'/`setcdr' -- the difference seems
> to be the return value.

The names and return values of setc[ad]r seem to stem from Emacs Lisp.
The return values of rplac[ad] are as in Common Lisp.  (Scheme has
set-c[ad]r! with undefined return values.)

> (Using such mutation is a bad idea anyway,

Sometimes it is useful for performance but care is required not to
mutate objects referenced from code that expects them to stay
constant.  And most code expects that.

> and using the result of a side-effect function is also a bad idea.)

Only when the return value is undefined.  E.g., not using the result
of nreverse would be kind of strange.

	Timo Korvola		<URL:>

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