> -----Original Message-----
> From: Mathias Grimm [mailto:mathiasgr...@gmail.com]
> Sent: Wednesday, December 22, 2010 9:12 AM
> To: internals@lists.php.net
> Subject: [PHP-DEV] RFC - MACRO
> 
> 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.

Although I am a C developer and use macros I think it'd be horrible to add them 
to PHP (+ it's been discussed and rejected many times in the past).

Macros make it very hard for a third party person to read your code + goes 
directly against the verbosity spirit we've always had in the PHP project. 
Forget also the fact that it creates a lot of problems with solutions such as 
debuggers.

I suggest if it's something you really feel you need then implement it 
externally to PHP as part of your build and deployment environment. There are a 
variety of templating/pre-processor solutions out there including the 
C-compiler tools themselves.

Andi

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to