[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [r6rs-discuss] [Scheme-reports] redefining eqv?
> I think one of the principal ways CASE was originally intended to be used
> was for fast dispatch on symbols or possibly numbers used as typetags in
> objects represented as lists, e.g.,
> (case (car object)
> ((node) .....)
> ((leaf) .....))
Now that I think about it, I think that I almost never use CASE with
something else than symbols and numbers.
And the more I think about it (that, is, not a lot though), the more I
think that CASE is quite useless, as it could be implemented I guess
straightforwardly in terms of COND.
I of course do not care if implementations provide CASE as an
optimised extension, but I wonder whether CASE is at its right place
in the standard.
> I believe there are some Schemes, like STALIN, that highly optimize such
> CASE expressions. This would be harder to do in a higher-order CASE.
Let the implementation provide its own CASE-on-steroids for symbols and numbers?
It could even be a SRFI, eh.
But I'm definitely going off-topic, so I'll stop here and keep reading
what happens here, for it's still full of wise design explanations I
never ever considered.
Cheers,
P!
--
Français, English, 日本語, 한국어
_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@x
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss