Talk:First-class functions

From Rosetta Code
Revision as of 16:39, 24 February 2009 by rosettacode>ShinTakezou (even C could?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Even C could?

  • Functions can be stored in other collection types of the language... yes (pointers)...
  • Functions can be used as arguments to other functions... yes (pointers)
  • Functions can be returned as the value of functions... yes (pointers)
  • New functions can be created from others at run time... maybe?

The last one is unclear to me. I can guess what it means, but every language (like C) can build a runtime that allows functions to be created from others at run time; you can build a library allowing that... meaning that with such a library C becomes a language with first-class functions...

I bet classifiers say that C functions are not first class... And if you can write such code, this does not mean that the language has first-class functions... so all these theoretical classifications regard only the primitive syntax (or better semantics?) of a language...? Or could I try to cheat? (Like I did for one-liner...!) --ShinTakezou 16:39, 24 February 2009 (UTC)