-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[RFC] Indexing/iteration aspects on unbounded strings #8
base: master
Are you sure you want to change the base?
Conversation
I agree with this proposal and additionally I believe that Unbounded Strings are already tagged since they are controlled, no? |
When I developed GNATCOLL.Strings, I was really trying to work around some issues with the design of Unbounded_String, so this proposal would fix some of them. The fact that it is visibly tagged would let users use the more natural dot-notation to call methods. In terms of implementation, GNATCOLL.Strings has some nice tricks to improve performance (generic accessors to get the String value instead of function returning string, optional copy-on-write, small-buffer optimization,...). All of these combine to make a package more flexible than unbounded_string, though the latter is nicer for new comers to the language. Perhaps the standard should think of building those simpler packages based on more general and configurable ones. As mentioned, this would apply to unbounded_string, but could also apply to the standard containers (to control size growth algorithm for vectors, for instance) to give more advanced more control. |
|
||
versus | ||
|
||
.. code-block:: ada |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, this block of code is not displayed when the .rst is rendered.
I ilke this proposal a lot. We should try to understand the impact of what is mentioned in the 'drawbacks' section, by using modifying |
Unbounded string need not be visibly tagged in the current standard, but it does need to be (internally) controlled in so far as automatically recovering storage. So it would not be a major burden to make it visibly tagged. |
No description provided.