Subject: RE: [hackers-il] Sash

From: Chen Shapira <[email-masked]>
Date: Wed, 5 Jul 2000 12:49:23 +0200

> Well, this is all fine as a matter of principle. In practice there
> are other possible uses, such as encapsulating common code patterns
> (careful!). But there is no reason to use macros for efficiency in
> general or for inlining in particular.

You forgot obfuscation, as in nyh's fine example:
#define Xx putchar

but lets go back to usage of macros and const:
I can either use:
#define PIE 4
or
const pie = 4

when would I use what?

---

From: Oleg Goldshmidt <[email-masked]>
Date: 06 Jul 2000 08:30:33 +0300

> but lets go back to usage of macros and const:

You will use the macro only if you need to have 

     double x[4];

in your code. You will prefer to write 

     double x[PIE];

instead. In every other case you'll prefer 

     const int pie = 4;

Believe me, some day you'll be very happy when it shows up in the
debugger. 

-- 
Oleg Goldshmidt <[email-masked]> 
"... We work but wit, and not by witchcraft;
 And wit depends on dilatory time." [Shakespeare]

---

From: Moshe Zadka <[email-masked]>
Date: Thu, 6 Jul 2000 17:41:43 +0300 (IDT)

> instead. In every other case you'll prefer 

Why not

const int PIE = 4;

(that removes the temptation to change PIE)
--
Moshe Zadka <[email-masked]>
There is no GOD but Python, and HTTP is its prophet.