New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's a "first-class object"? #5034
Comments
I think it's questionable what the sentences that use this term are really trying to say. As in, does the use of "functions" in those sentences actually mean "functions" in the core language sense? Perhaps. In which case, the sentence means that, with the wrapper functionality, core language functions act as, and can be made into, callable objects. |
Agreed this needs fixing. |
Yes.
Right, which is true. ("Callable object" is defined by the library). But you can also turn a function into a callable object just by taking its address, as a function pointer is a callable object. "First-class object" is a commonly used term in the field of programming languages, but we can remove it if it's a problem. The end of that sentence isn't adding anything. The point of |
I'm not a fan of this alleged term at all. It ranks right up there with "safe" as a term that's unhelpful and nebulous and could easiy be replaced by a more appropriate term. How is a a first-class object different from any other kind of object? What other classes are there? Why not just "object"? I would not shed a tear over losing this sentence entirely. |
Obviously, a first-class object is an object that has bells, whistles, and skids, so let's get rid of that phrase. |
It's a term that has its own Wikipedia page. |
And given the existing but sightly different meaning of "object" in C++, maybe saying first-class citizen would have been better here. But removing it doesn't decrease the usefulness or correctness of those paragraphs so I agree with removing it. |
problem with paper/spec:
What is a "first-class object"? There are 2 uses of this undefined term.
Originally posted by @burblebee in #5013 (comment)
The text was updated successfully, but these errors were encountered: