Re: why funcall is needed in things like ((foo) 10)
- From: Harald Hanche-Olsen <hanche@xxxxxxxxxxxx>
- Date: Thu, 05 Oct 2006 23:13:29 +0200
+ Rahul Jain <rjain@xxxxxxxx>:
| Just like the word "record" has different meaning when used as a
| verb vs. a noun, a lisp symbol or expression can have different
| meanings when used as an operator vs. a variable.
A symbol yes, but an expression? Variables have SYMBOL-VALUE and
SYMBOL-FUNCTION, but an expression like (foo bar) doesn't have that
distinction, so I don't see a /technical/ reason why
((foo bar) this that)
couldn't be syntactic sugar for
(funcall (foo bar) this that)
But perhaps nobody felt a need for it, and maybe they thought the
funcall version is clearer anyhow. Personally, I have no problem with
having to write the occasional FUNCALL, and it does point out very
clearly to the reader that something special is going on. (If I ever
see a FUNCALLs of the above sort in the code, I would begin to suspect
that the writer was unfamiliar with generic functions.)
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
.
- Follow-Ups:
- Re: why funcall is needed in things like ((foo) 10)
- From: Barry Margolin
- Re: why funcall is needed in things like ((foo) 10)
- From: Pedro Kröger
- Re: why funcall is needed in things like ((foo) 10)
- From: Rahul Jain
- Re: why funcall is needed in things like ((foo) 10)
- From: Pascal Costanza
- Re: why funcall is needed in things like ((foo) 10)
- References:
- why funcall is needed in things like ((foo) 10)
- From: Pedro Kröger
- Re: why funcall is needed in things like ((foo) 10)
- From: Glenn . Ehrlich
- Re: why funcall is needed in things like ((foo) 10)
- From: Pedro Kröger
- Re: why funcall is needed in things like ((foo) 10)
- From: Pascal Bourguignon
- Re: why funcall is needed in things like ((foo) 10)
- From: Pedro Kröger
- Re: why funcall is needed in things like ((foo) 10)
- From: Rahul Jain
- why funcall is needed in things like ((foo) 10)
- Prev by Date: Re: [CLOS] Ensuring a method exists
- Next by Date: Re: How to efficiently deep copy a fixnum / unsigned byte array?
- Previous by thread: Re: why funcall is needed in things like ((foo) 10)
- Next by thread: Re: why funcall is needed in things like ((foo) 10)
- Index(es):
Relevant Pages
|