What is Expressiveness in a Computer Language
pc at p-cos.net
Tue Jun 27 23:04:39 CEST 2006
> Joe Marshall wrote:
>> Marshall wrote:
>> It isn't clear to me which programs we would have to give up, either.
>> I don't have much experience in sophisticated typed languages. It is
>> rather easy to find programs that baffle an unsophisticated typed
>> language (C, C++, Java, etc.).
> C and Java, certainly, but I'm wary these days about making
> any statement about limitations on C++'s type system, for it is
> subtle and quick to anger.
>> Looking back in comp.lang.lisp, I see these examples:
>> (defun noisy-apply (f arglist)
>> (format t "I am now about to apply ~s to ~s" f arglist)
>> (apply f arglist))
>> (defun blackhole (argument)
>> (declare (ignore argument))
> The noisy-apply function I think I understand; it's generic on the
> entire arglist. In fact, if I read it correctly, it's even generic
> on the *arity* of the function, which is actually pretty impressive.
> True? This is an issue I've been wrestling with in my own type
> system investigations: how to address genericity across arity.
> Does noisy-apply get invoked the same way as other functions?
> That would be cool.
> As to the black hole function, could you explain it a bit? I apologize
> for my lisp-ignorance. I am sure there is a world of significance
> in the # ' on the third line, but I have no idea what it is.
You can ignore the #'. In Scheme this as follows:
(define blackhole (argument)
It just means that the function blackhole returns the function blackhole.
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
More information about the Python-list