[GRLUG] python app speed

Michael Mol mikemol at gmail.com
Thu Jul 16 21:44:55 EDT 2009


On Thu, Jul 16, 2009 at 9:11 PM, Ben DeMott<ben.demott at gmail.com> wrote:
> PHP's Weakness is ZEND - 2.0 fixed a lot of problems, but there have been
> large amounts of talk about completely separating from the Zend Engine
> altogether and using the same interpreter that PERL Uses as the foundation -
> which I am in favor of - and I will help with if the decision is made.

You're talking about the Parrot engine, right?  I wouldn't mind that,
but for the love of Von Neuman and all that is sane, stay away from
the Perl 5 parser!

>
> The curly brace and breaking in and out of PHP - no worries Michael PHP 6 is
> likely going to remove the braces being optional - if you interrupt a
> command you break the interpreter. (you can't leave code within a block)

If I understand what you're saying:

// This will work
if(true)
{
  echo "blah";
}

// This won't
if(true)
  echo "blah";

// And neither will this
if(true)
{
  ?>blah<?
}

That last is actually worrisome; It's far, far easier to output HTML
code with ?><? than it is with echo and print, due to interpolation
and escaping issues, and using it within loops is naturally helpful
for processing lists.

>  -
> I see what you mean by it being an inconsistency however.
>
> <?php
> function myfunc ?> <htmltag> <?php () {
>
> }
>
> ---- Obviously INVALID.

My mind boggles why someone would write a line like that--and I used
to tutor beginner programmers.

>
> Zend has a bug currently in the release of 5.2.9 like so:
>
> <?php $mystring = "string" . 'string' . "string $var" . (4+5) . 'hi'; ?>  =
> works
> <?php $mystring = "string" . 'string' . "string $var" . (4+5) . 'hi' =
> works  (one liners don't need an semicolon or a closing brace if its the end
> of the file)
> <?php $mystring = "string" . 'string' . "string $var" . {4+5} . 'hi'; ?>  =
> crashes the Zend Interpreter with "UNKNOWN COMPILE ERROR"
> - The curly braces are obviously void - but the fact that for some reason
> concatenation and braces causes it to break to a point of not generating a
> line notice is beyond me.
>
> The only other similar language offering in the Microsoft or .NET world is
> VB for rapid development and don't even get me started.

Actually, I'd think the closest to PHP's syntax would be C#.

>
> Its open source, why not contribute and help the PHP community fix the
> issue!! :)

I filed a bug with the Debian folks when I first discovered it. I'm
currently on the dev team for GeSHi and do the back-end stuff and
community management for Rosetta Code.  I'm already pretty busy
helping the open source languages community in a general sense.
(Though I do find it odd at the cold reaction I got when I mentioned
Rosetta Code in ##php last week.)


-- 
:wq


More information about the grlug mailing list