Skip to content

[expr.new], [class.free] Remove "free store" from the index #7041

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

Closed

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented May 31, 2024

As we have already indexed class-specific allocation and deallocation functions, it is perhaps fine to remove "free store".

source/intro.tex Outdated
@@ -16,8 +16,8 @@
\Cpp{} provides many facilities
beyond those provided by C, including additional data types,
classes, templates, exceptions, namespaces, operator
overloading, function name overloading, references, free store
management operators, and additional library facilities.%
overloading, function name overloading, references, allocation and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't preserve the meaning of the original wording, which describes features that C++ has beyond C. C also has allocation and deallocation functions (malloc and free).

If we said replaceable or class-specific allocation functions, that would be a beyond-C feature.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just keep the word operators, since that's what it originally said, and C doesn't have those. The operators construct and destroy objects instead of just allocating. C doesn't have that (just calloc which doesn't work for non-trivial types).

Copy link
Contributor Author

@frederick-vs-ja frederick-vs-ja Jun 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't preserve the meaning of the original wording, which describes features that C++ has beyond C. C also has allocation and deallocation functions (malloc and free).

In the C++ standard wording, allocation and deallocation functions are operator new/operator new[] and operator delete/operator delete[] but not other functions. But such meaning seems confusing in more general contexts.

I'm now using "allocation and deallocation operator functions", as these functions are also operator functions ([over.oper.general]/1) and operator functions are clearly beyond C.

Copy link
Contributor Author

@frederick-vs-ja frederick-vs-ja Jun 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just keep the word operators, since that's what it originally said, and C doesn't have those. The operators construct and destroy objects instead of just allocating. C doesn't have that (just calloc which doesn't work for non-trivial types).

Hmm, however, as you said here, the new and delete operators are more than "free store management" which seemingly just refers to allocating and deallocating. The original meaning is unclear to me.

An early draft seemingly indicated that free storage management operators are allocation and deallocation functions (in Clause 12).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwakely, @jensmaurer Thoughts on "allocation operator functions"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We never call those "allocation operator functions". They're just "allocation functions". Also, the original wording talks about "free store management operators", which is something like "new T" (allocates and constructs), whereas allocation functions just allocate raw bytes --- and C has those, too, sort-of.

I think "free store management operators" is good enough for this intro paragraph.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Jens, agreed!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if we keep using "free store management operators", #5558 and #7040 won't be addressed, as it will be still unclear what free store is.

@tkoeppe tkoeppe closed this Jun 17, 2025
@jensmaurer jensmaurer reopened this Jun 17, 2025
@jensmaurer
Copy link
Member

@tkoeppe , my comment was applying to a single use of "free store"; there are other replaced uses that might be fine (I haven't looked). Closing this pull request based on a single bad change feels over-the-top.

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Jun 17, 2025
@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 17, 2025

The rest is just indexing I think, but sure.

@frederick-vs-ja frederick-vs-ja changed the title [intro.scope], [expr.new], [class.free] Remove remaining "free store" [expr.new], [class.free] Remove "free store" from the index Jun 18, 2025
@jensmaurer jensmaurer removed the changes requested Changes to the wording or approach have been requested and not yet applied. label Jun 18, 2025
@jensmaurer
Copy link
Member

Ah, right, the rest is just indexing indeed. And we do want to have "foreign" phrases in the index in case people go looking for them, so that we can direct them to "our" world.

Apologies.

@jensmaurer jensmaurer closed this Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants