Re: RFC - MACRO
| From: | Nicolas A. Bérard-Nault | Date: | Sat, 25 Dec 2010 00:28:21 +0000 |
| Subject: | Re: RFC - MACRO | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51132@lists.php.net to get a copy of this message | ||
This has been brought up countless times and has always been rejected
(browse the archives if you aren't convinced).
Anyhow, I just hope I never have to maintain code you write in this fashion..
Pre-compilation macros are very out of character in the dynamic languages
paradigm and I doubt they'd be useful in any case. The examples you gave
convinced me once and for all that this is a very² bad idea. There's a
reason why no modern language uses three letters tokens for common
statements, I'll let you guess what it is.
Anyhow, merry Christmas.
P.S.: SCOPE_CLASS ? Have you ever heard of namespaces ?
On Wed, Dec 22, 2010 at 12:11 PM, Mathias Grimm <mathiasgrimm@gmail.com>wrote:
> I want to request a C/C++ feature that i think is good.
>
> MACRO
>
> <?php
> MACRO('PF','private function _');
> MACRO('SCOPE_CLASS','class MyProject_');
>
> class UseMacro
> {
> PF preSave($object)
> {
> //...
> }
>
> }
>
> SCOPE_CLASS Internal
> {
>
> }
>
> I don know if there is a RFC for this feature.
>
--
Nicolas A. Bérard-Nault (nicobn@gmail.com)