Namespaces are here!

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

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Ok, now that you have done your homework, how did Zend get its name. And no peaking on Google either.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Maybe someone should has Andy and Zeev why their company is called that. ;)

I do think the Rasmus article highlights a mindset that is responsible for so many things like the namespaces implementation. Think of _autoload that had to be fixed with spl_autoload, and the magic functions that they had to keep fixing and fixing. And the firedrill of features that were added to 5.2 so the Zend Framework would work. It is a little annoying that they were many of the things that the framework guys had asked for years ago (and were sort of told to go away).

And I am honestly not being critical of their competence. I think PEAR is another example -- again very competent. The problem is a lack of visionaries. The PHP/PEAR types eventually fumble their way to something reasonable, but you really can't call it innovative (unless you squint really hard). I don't claim I would do any better, and I certainly don't want to criticize their achievements -- but that does not change the reality.
(#10850)
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Zeev-Andi. Zend.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

It keeps me wondering... How is another layer of complexity going to make php any better?

My original reason to choose for php was because of it's simplicity. If it gets any more complex than it is already, i wonder why i would choose for the wannabe platform when there are other platforms that have already matured...

Why do you want to build a framework if your language still allows for xss and sql injection attacks that easily? (Any other platform has atleast some countermeasures, eg: applying htmlentities to all output by default)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I've already started drifting down the Java route. I almost long for Java's OO model, nicely mixed with PHP's huge featureset. To be honest, PHP 5 is pretty darn close to what I just described anyway. Exceptions for one, were a definite improvement in PHP 5. It didn't just sprinle sugar into the language, it actually allowed you to handle program flow differently. You can do things with exceptions that you just cannot do with errors. Shame they skipped on "finally { }" though.

I'm not sure that PHP is adding complexity. They're not taking away the abilty to develop like everyone developed in PHP4, they're just adding features and increasing flexibility. The scary thing is just how much PHP seems to be turning into a loosely-typed Java. It's a way I feel comfortable developing, but its probably half the reason I'm spending more and more time writing Java outside of work these days too. Even the code people are writing is starting to look more and more like Java, and MVC frameworks + template engines are making web apps look like more Servlets + JSP. Heck, you can even use the Java extension to work with your Java classes inside PHP 8O

I agree that there has to be a line which mustn't be crossed and they're probably standing on it now.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

d11wtq wrote:I agree that there has to be a line which mustn't be crossed and they're probably standing on it now.
I bet if you asked them, the only line they are afraid to cross is the line of strict / loose typing. I'd personally prefer strict typing, but since it isn't a compiled language, it may not help much...

You think PHP is getting closer to Java or closer to C++? I honestly can't tell which way they're after.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

superdezign wrote:
d11wtq wrote:I agree that there has to be a line which mustn't be crossed and they're probably standing on it now.
I bet if you asked them, the only line they are afraid to cross is the line of strict / loose typing. I'd personally prefer strict typing, but since it isn't a compiled language, it may not help much...

You think PHP is getting closer to Java or closer to C++? I honestly can't tell which way they're after.
There's no way it's getting like C++ ;) Well, it's got curly braces and classes, but other than that it's quite different really, unless you compare it to something like lisp, then it's frighteningly similar :P

I'm not sure about strict typing. I've argued before that it would be a nice "optional" feature but my stance on it now is that if you want strict typing you're using the wrong language. I can understand why you'd want to be able to type hint on interfaces, but type hinting on strings for example is taking it a little bit far I think. I'm not even sure it's easily doable without a massive rewrite of the engine.

I'm quite happy with the language as it stands. The additional things I'd like to see are relatively minor and not so important.

Decent namespacing
Try/Catch/Finally

That's all really :)
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

If you ask me, Ruby is the way to go. Oh wait, nobody asked me.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I agree with d11 about PHP being similar in style to Java. Have you ever picked up some Java code and read it? I am doing this with Head First Design Patterns at the moment. I swear I can readily port their Java examples to PHP on the first run. It makes sense to me, and it is something that I really to start looking closer into.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

I'd also like some control (or at least more insight) on the memory handling. We could speed things up on our own if we could optimize like that.

Edit: Maybe I just like C++ so much that I was hoping they'd be moving in it's direction. There are a lot of similarities with Java, aside from the forced OO.
Post Reply