in reply to Re: hangover from perl...
in thread hangover from perl...

Avoid comments for speed? That's riddiculous. I've never yet heard of that. The usual claims are that comments are bad because you should write code such that it is clear without comments.

Replies are listed 'Best First'.
Re: Re: Re: hangover from perl...
by exussum0 (Vicar) on Apr 27, 2004 at 19:21 UTC
    php, like perl, in it's more bare form, skip the caching stuff or mod_perl, needs to compile scripts as they are called, no?

    With php at this company, the theory was (update not mine :P), less chars, the better for the parser. Don't ask me why and how valid the argument is for such a minute thing.

      The argument's validity is nearly nil. Most "interpreted" languages these days run through a compile phase that will get rid of comments before the actual runtime occurs. If Jesus was a programmer, he would have called this behavior straining out the gnat and swallowing the camel.

      ----
      : () { :|:& };:

      Note: All code is untested, unless otherwise stated

        I know, and I agree, it was minimal for php. I was a big proponent of killing the stupid thing. It was more problems than anything else.

        Update: I do know one language like that, meta-html. It had a small following. Written by Brian Fox, of the bash shell. One of the optimizations was, to kill all spaces in your code... because to do output, it'd replace code with spaces or their literal output. But if you put code in a for loop, it'd just repeat the spaces over and over. So killing all spaces made things "better". (http://www.metahtml.org/)

        It's forking model was horrible too... It would get a request, fork a new listener thread and use the current thread to process the request. And when that thread received a request, it would do the same. Really lame...