Talk:cpp/ranges/split view
From cppreference.com
< Talk:cpp
Did anyone try to press the 'Run this code'? 86.21.216.255 02:49, 1 February 2022 (PST)
- Yup, coliru's a little behind the times. There's a wandbox link provided for this reason --Ybab321 (talk) 03:22, 1 February 2022 (PST)
Should we go ahead and rename this subtree of pages to lazy_split_view
? If I'm reading this right, the change is applied retroactively to C++20 https://github.com/cplusplus/papers/issues/912 --Ybab321 (talk) 03:45, 18 July 2021 (PDT)
- Hi.
- I. As to the new/old pages-tree for split_view/lazy_split_view, I think we could proceed better. Instead of renaming the existing split_view pages-tree, we can reuse it:
1) Create a new tree with the name
lazy_split
.2) Copy by hand the content of the current (old)
split_view
pages-tree to that new pages-tree (copy-paste ~5 pages).3) (Re)fill split_view pages-tree with that content of "split_view2".
- The advantage of this approach is that it can be done without admins privileges. Also links stay valid (seem so).
- II. Another issue to be mentioned is the naming of this couple: split_view and lazy_split_view. In my opinion, a better approach to the naming could be:
1) leave the old name as it is: split_view;
2) assign a new name to the improved (superior) (' the .
split_view2
') string splitter. The new name could be (naming is hard:) tokens_view
, because this is what the split_view2
does in essence- The renaming of split_view itself is troublesome for 'STL' implementers, this introduces a tangle on its own (not to say about documenting this on cppreference :).
- Besides, the name lazy_split_view is not ideal (as everything in this world):
1) the name lazy_split_view brings the implementation detail ("laziness") into the interface, which is usually not a best practice (it's an unnecessary information);
2) all views are more or less "lazy" by design, so it is rather strange to pop up one and name it "lazy". :)
- --Space Mission (talk) 05:14, 18 July 2021 (PDT)
- Oh, tokens_view name is also inappropriate -
split_view
does split, not tokenizes. Edited: --Space Mission (talk) 06:58, 18 July 2021 (PDT). Edited:
- Oh, tokens_view name is also inappropriate -
- For point 1, I have no horse in the link validity race, either way seems fine to me. For point 2, we can't be deviating from the standard names, so it's a moot point. In my head canon, it's called "lazy" split view because the standards people were too lazy to consider how split view should work (considering how every other language does it). I think the official justification is that it's even lazier than the new split view, and judging from the github thread, no one wanted to continue the bikeshedding discussion. --Ybab321 (talk) 11:06, 18 July 2021 (PDT)
- Yea, let's stay with what was given by the Committee.) --Space Mission (talk) 19:57, 18 July 2021 (PDT)