Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Initialize pointers to NULL in Managers.cpp

<< < (3/5) > >>

280Z28:
Macros are not the devil. I think y'all are going overboard with some of this...

takeshimiya:
Macros is a C thing.

If C++ suffers from C heritage, so if it wants to survive from people going out to new languages like Java, Phyton, C#, etc. it should make easy to get rid of those things if the user desires so.

In fact I think that if C++ would be D, a lot of people wouldn't be migrating to those other languages.

280Z28:
It's a neat concept, but keep in mind what language we're working with here. C++ programmers are used to seeing macros used for a wide variety of tasks and will remain so for the forseeable future. You don't want to make things difficult for new members of the project when you don't have to. One thing that would make things more difficult is changing the way that people expect to see common tasks done.

tiwag:
I don't want to have a holy war about evil macros and so on - there are really better places (comp.lang.cpp ...) for such threads  8)

But i really think it is a matter of taste or maybe ignorance or it depends on what you've been used to use for much years -
so it is much more probable that you use macros instead of C++ elements when you are older and have a reasonable C background.

All the arguments for a better (saver, better portable, ...) coding style are right, no doubt,
but in the end every single programmer has to know in detail, what he is doing and i can't imagine
to use a programming language, which wouldn't me allow this  :) even if there exists a residual risk to make a programming error  :P

just my 2 cents

thomas:

--- Quote from: Takeshi Miya on December 13, 2005, 03:35:36 am ---And there is any way to not use macros in cases of compile time options (like #ifdef USE_UNICODE and such)?
--- End quote ---
#pragma once
But this is even more evil than using include guards, because it is not supported by all compilers. Pragmas are compiler-specific.


--- Quote from: Takeshi Miya on December 13, 2005, 03:53:19 am --- if it wants to survive from people going out to new languages like Java, Phyton, C#, etc.
--- End quote ---
Not true, the language features are all there, people are only too lazy to use them.
Whether you write final int blah = 5; or const int blah = 5; is pretty much the same. Only in Java you have no other choice, while C++ will still work with a macro, too (and most people just do what they have been doing for many years). This does not make Java a better language, though (let's not even talk about C#).


--- Quote from: Takeshi Miya on December 13, 2005, 03:35:36 am ---so I can deduce the autor was born before 1977 :P
--- End quote ---
I was too ... and I still use const vars except when I really have to :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version