Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

EnvVars Plugin and PATH

<< < (8/9) > >>

MortenMacFly:

--- Quote from: oBFusCATed on February 13, 2012, 11:57:56 am ---// Style zealot hat on
Calling Manager::Get()->GetXXXManager() on multiple lines looks wrong and ugly to me
// Style zealot hat off

--- End quote ---
These debug messages will (of-course) be commented later before commit. And then, if you want to see only one of these, you'll need this Manager::Get()->GetXXXManager() stuff... :-)

oBFusCATed:
Leaving commented code is event uglier :)
If you want to do that, why don't you define some marco? :)

MortenMacFly:

--- Quote from: oBFusCATed on February 13, 2012, 12:18:32 pm ---If you want to do that, why don't you define some marco? :)

--- End quote ---
I recall you have been the one that said macros are ugly. ;-)

Seriously: A macro doesn't help here. Because these debug messages are there to debug a specific function, so IMHO it's easier to leave it commented and un-comment if needed rather then to have a million macros to enable debug messages for a certain/specific function on demand. Might be just my habit though...

oBFusCATed:

--- Quote from: MortenMacFly on February 13, 2012, 12:21:35 pm ---I recall you have been the one that said macros are ugly. ;-)

--- End quote ---
In that particular case it was pretty ugly :)

Leaving commented code is pretty ambiguous,
because the reader of the code doesn't know the true intentions of the writer of the code.
Using per file macros is the better way to do it:)

MortenMacFly:

--- Quote from: oBFusCATed on February 13, 2012, 12:39:48 pm ---Using per file macros is the better way to do it:)

--- End quote ---
Again: In this case the compiler has many functions and I usually don't want to debug all of them.


--- Quote from: oBFusCATed on February 13, 2012, 12:39:48 pm ---Leaving commented code is pretty ambiguous,
because the reader of the code doesn't know the true intentions of the writer of the code.

--- End quote ---
I think it should be clear by:
Manager::Get()->GetLogManager()->DebugLog( BLAH );

I think there is no generic "always working - always good" way.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version