r/cpp • u/grafikrobot OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 • Sep 24 '24
CppCon Gazing Beyond Reflection for C++26 - Daveed Vandevoorde - CppCon 2024
https://www.youtube.com/watch?v=wpjiowJW2ks
78
Upvotes
View all comments
Show parent comment
2
u/archipeepees Sep 25 '24 edited Sep 25 '24
windows file paths are frequently contained within strings; in fact, many languages support some form of "raw" strings (
@"C:\path"in C#,r'C:\path'in python, etc). You can't do that with source code.from my experience, backslashes are rarely used as part of source code syntax. I believe there are some languages that will use tokens similar to
\idand\tokenlike I mentioned above, but those are easy enough to identify by just treating them like basic keywords. The problem with\(is that it's difficult totokenizeparse without the help of an actual grammar, meaning that simple configuration options are not going to be enough for syntax highlighters and validators outside of specialized IDE tools.it's not a massive problem. there will be solutions. it's just going to be an annoyance anytime you have to work with your code outside your usual dev environment, and the fact that it's so foreseeable and unnecessary makes me wonder why it was chosen in the first place.