Page 2 of 2

Re: Should Declare use be avoided as much as possible?

Posted: Wed Oct 19, 2011 8:11 pm
by Tenaja
We are on the same page, then.

Don't miss the edit to my last post.

Re: Should Declare use be avoided as much as possible?

Posted: Wed Oct 19, 2011 8:13 pm
by Shield
Tenaja wrote:Don't miss the edit to my last post.
Yep, +1 on that one. :)

Re: Should Declare use be avoided as much as possible?

Posted: Wed Oct 19, 2011 8:43 pm
by idle
I think it's good practice to use declares from a documentation point of view, they tell you at a glance whats
in the source and there's absolutely no penalty from using them since they're not compiled into the executable.
They're simply required in some cases when there's a forward reference since the compiler only does a single pass
declare simply adds the function to the compilers symbol table and functions prototypes so it can do type checks
and what not.

Re: Should Declare use be avoided as much as possible?

Posted: Thu Oct 20, 2011 1:35 pm
by Blood
idle wrote:I think it's good practice to use declares from a documentation point of view, they tell you at a glance whats
in the source
The IDE does that.

Re: Should Declare use be avoided as much as possible?

Posted: Thu Oct 20, 2011 3:08 pm
by Tenaja
Notepad++ doesn't... :mrgreen:

Re: Should Declare use be avoided as much as possible?

Posted: Thu Oct 20, 2011 6:41 pm
by Blood
Tenaja wrote:Notepad++ doesn't... :mrgreen:
Write a plugin. There are a few function list plugins available for Notepad++ for ideas.

Re: Should Declare use be avoided as much as possible?

Posted: Thu Oct 20, 2011 7:05 pm
by idle
Blood wrote:
idle wrote:I think it's good practice to use declares from a documentation point of view, they tell you at a glance whats
in the source
The IDE does that.
sure it shows you the functions but not the parameters,though if your implementing a class you generally need to declare the functions
its pretty much personal preference at the end of the day