Hacker News new | ask | show | jobs
by groovy2shoes 3724 days ago
Here's the thing, though: when some element of a language is subject to silly restrictions that other first-class elements of the language are not subject to, that element is, by definition, second-class. The reason being that you can't treat it the way you'd treat any other first-class element.
1 comments

I see where you're coming from, but still, after the function value is created, there's no restriction on its use. Contrast what some call second-class continuations, which can be invoked only once -- a much more severe restriction.

I could see saying something like, Python functions are semantically first-class but syntactically second-class. Or maybe we should just call them "business-class" :-)

(BTW your comment downthread about referential transparency is spot-on.)

"Business-class" -- I like that!

And I also see (now) where you're coming from. But it's hard for me to accept the "once the value has been created" exception, because in my mind the construction of a value is as important as any other operation on that value.

Anyway, I'm not going to argue this any further -- I think we understand each other's perspective and we can pretty much resolve to chalk this one up to the (rather unfortunate, imo) lack of precision that's so common to terminology in computation science (see also: any debate whatsoever about types ;) ).