@traducerad This doesn't actually prove them wrong
nor have I heard anyone actually make a compelling argument on that. The usual reason is that they are occasionally needed because of things you can't do yet
@traducerad They are almost never defined there, they are almost always in headers
@traducerad I can disprove most of those people with This example something I've actually seen people easily mess up that wouldn't have been an issue had they just used a template
the macro MY_SUM is not typesafe, yet I am able to compile this. The other macro MY_INIT, doesn't let me compile this code
@Mgetz what you expose in your header is what you want the end-user to use. Your x macro which is used to just win some lines and not make any typos has nothing to do with the endproduct and should therefor not be in the header file
those shenanigans should be kept inside the source file
@traducerad my point is that is fine in theory, but the reality is that's never what happens. Look at the boost headers... they are an unholy mess of macros to support different compilers.
constexpr is pretty much what macros largely should be in most cases where most people abuse them for init stuff. For cases where you need code generation see Herb Sutter's metaclasses proposal
All identifiers that begin with an underscore followed by a capital letter or by another underscore (these reserved identifiers allow the library to use numerous behind-the-scenes non-external macros and functions)
it is said that only the compiler, linker, std libs and the system on which your software runs are allowed to use variables prefixed by a double underscore
is that in order to prevent shadowing? if you were to redefine such a variable in your code, shouldn't the compiler just tell you this variable is already defined elsewhere?
This means that if you were to write a device driver which is inserted in the kernel and thus part of the system on which your software runs, it is perfectly fine to prefix your variables by __
although I don't immediately see what the dangers could be
"C++ implementation" means the compiler plus linker plus standard libraries plus the system that the program actually runs on. Everything except your source, basically.
An implementation is something that implements the C++ standard.
So the book is not saying that any particular thing calls you...
@Puppy depends on the kernel, quite a few have dedicated libc subsystems that do things in very kernel flavored ways that may not fully correspond to the standard.
well kmalloc may be part of a libc subsystem but it is not a Standard function, so if it isn't used in implementing a Standard function, then it's not technically part of the implementation by Standard
of course in this case it's pretty arguably if the Standard matters much
whether or not the kernel organises it into a subsystem that might happen to contain other Standard-related functions is really immaterial
Went to this talk about cyber security, the most useful thing I got out of the first half was that I partially cleaned up my spam email account. It's only the last 20 minutes I got something useful out of the talk. Thank god I brought my macbook!
Also get to talk to a girl who is working in the A.I. field, who confirmed my suspicion that you almost never get enough data to get the accuracy you desire at the present when it comes to A.I. training.