I wish PHP supported...

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

I wish PHP supported...

Post by alex.barylski »

C style pre-processor macros...

I have encountered an instance where, although using functions works, it's a messy couple of lines needed in alot of functions...and I cannot normalize the code any further using a single function...

It really sucks...and it's not nessecary for anyone to see the details of whats happening just to know it's there would be awesome...but instead of a single nice little macro which expands into my ad hoc hack, I have to use functions...

Bummer :(
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yes, I'd love macros. The only thing I can think of is doing a substitution on code loaded in, afterward running through eval() .. but that feels like a messy hack. :?
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

yes, I'd love macros. The only thing I can think of is doing a substitution on code loaded in, afterward running through eval() .. but that feels like a messy hack.
Does sound messy if your think of doing that on the production server but no reason you couldn't add it to the build/deployment process, is there?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

true, one could do a pass with dumping to final baking of files for FTP.. still feels a tad bit messy though. But not so much after baking.
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

feyd wrote:true, one could do a pass with dumping to final baking of files for FTP.. still feels a tad bit messy though. But not so much after baking.
Been baking my files for a while but I use Perl as the preprocessing language. Can do just about anything the C preprocessor does.
Post Reply