top | item 25322803

(no title)

blockmeifyoucan | 5 years ago

I think you are misunderstanding.

In common Lisp you can call a regular function defined with defun as (foo "something"), but if bar is a variable containing a fuction you have to use (funcall bar " something"). I agree that this is weird and confusing.

discuss

order

kame3d|5 years ago

Isn't that the same thing as using function pointers in C?

You need the * to access the function the variable points to.

oalae5niMiel7qu|5 years ago

No you don't. You call the pointer itself. It points to the first instruction in the function.

It's more like Ruby's method(:foo) and .call().

eigenspace|5 years ago

Sure, this isn't that rare of a thing for languages, but it is increasingly rare to find people who think this is a good idea.