Weekend update: Operator and parsing design notes
source link: https://herbsutter.com/2022/10/10/weekend-update-operator-and-parsing-design-notes/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Weekend update: Operator and parsing design notes
Thanks again for all the bug reports and feedback for Cpp2 and cppfront! As I mentioned last weekend, I’ve started a wiki with “Design notes” about specific aspects of the design to answer why I’ve made them they way they currently are… basic rationale, alternatives considered, in a nutshell, as quick answers to common questions I encounter repeatedly.
This weekend I wrote up three more short design notes, the first of which is the writeup on “why postfix unary operators?” that I promised in my CppCon 2022 talk.
- Design note: Postfix operators. Why are unary
*
and&
postfix? What about++
? Why does the->
operator naturally disappear? - Design note: Postfix unary operators vs binary operators. What about examples like
a**b
? - Design note: Unambiguous parsing. How does Cpp2 parse things that seem ambiguous and/or challenging, like
a<b>c,d>
?
Published by Herb Sutter
Herb Sutter is an author and speaker, a software architect at Microsoft, and chair of the ISO C++ standards committee. View all posts by Herb Sutter
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK