Re: [PATCH] Choose syntax
- From: Pavel Tsekov <ptsekov gmx net>
- Cc: MC Devel <mc-devel gnome org>
- Subject: Re: [PATCH] Choose syntax
- Date: Tue, 12 Jul 2005 10:14:02 +0300
Hello,
On Mon, 11 Jul 2005, Leonard den Ottolander wrote:
> On Mon, 2005-07-11 at 17:02, Pavel Tsekov wrote:
> > Instead of a macro you could use the following construct:
> >
> > static const int MAX_ENTRY_LEN = 40;
>
> Yes, I could to that. Why do you feel this is a cleaner approach?
I know that it is cleaner and better. The macro is something that is
handled by the preprocessor i.e. before the compiler steps in. So the
compiler doesn't know anything about MAX_ENTRY_LEN . If it knew it could
do useful checks (like typechecking and more) and certain smart decisions
(if the compiler is smart enough :) ). Also you cannot have debugging
information for a macro.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]