These are chat archives for ChaiScript/ChaiScript

3rd
Apr 2018
jhihn
@jhihn
Apr 03 2018 13:41
Hey Jason, you're a really smart guy. I thought I knew C++ until I saw your videos. I was wondering though, have you ever thought about an automated tool to scan C++ code and "optimize" it? There's so much optional decorator stuff that could be applied automatically I think, like const, noexcept, references, etc. It would output full properly decorated code. Or is there something like this already? It's kinda like a linter but not.
Jason Turner
@lefticus
Apr 03 2018 13:43
cppcheck will get you close. Nothing right now will tell you when something could/should be noexcept tho
and I don't know how hard it would be to write something that could detect that
jhihn
@jhihn
Apr 03 2018 13:44
Well, I think you'd "just" have to scan all the things and know which ones throw exceptions, then back it up the hierarchy.
Thanks, I'll check cppcheck.
One annoyance I just discovered, because I work in multiple languages any given day, is the C++14 initializer syntax. Where JS uses var z = {} c++ is int z {6}. Not being able to use an '=' between the name and the value bugs me. And then there's "int x(6)" which would also be shared.
they look so close.