Live data from Hacker News

PHP Short Syntax for Arrays: developers say no.

wiki.php.net

41–50 of 89 posts

Re: PHP Short Syntax for Arrays: developers say no.

#41
post #4

Contra ... Not searchable through search engines That's a ridiculous argument.

Not being SEO friendly is an interesting argument. While learning Python, when things like list comprehensions came up in code I was reading, it was very hard for me to figure out how it worked when I couldn't Google the syntax.

Re: PHP Short Syntax for Arrays: developers say no.

#42
post #19
post #16

Why try to make PHP more readable? Just use another language. PHP, like C++, is a big industry dinosaur that can't and won't change. In my opinion, the best think you could do is create a new language which compiles to PHP. I.e. A coffeescript for PHP. You don't have to "vote" and get stupid arguments against; you don't have to be backward compatible; and you only have great programmers in that project since crappy o…

But why not make it more readable? The patch exists - all it would take is for it to be accepted. And there are a ton of people who can't justify the switching costs of moving to a different language. And true, a lot of us aren't great programmers. So? Better tools help. And it's perfectly okay to build and improve tools that regular people will use. Even if they won't be creating the Mona Webapp. ;)

Why not make it more readable? Because I feel like every attempt made to improve PHP are refused by the community.

Re: PHP Short Syntax for Arrays: developers say no.

#43
I've just spent a while reading the most recent of the discussion threads linked from there, and they're just further examples of the hostile and insular communities that form around far too many open source projects. Frustrating to read, painful to participate in.

http://markmail.org/message/4brot4f6kthjfzse

Re: PHP Short Syntax for Arrays: developers say no.

#44
post #21

Earlier quoted context omitted.

> coffeescript for PHP Make this happen please. I can't think of a more deserving language and it'd make my day job a lot nicer.

Haven't had a chance to check it out, but here's an option: http://pypi.python.org/pypi/hotpotato

Seems interesting. The big caveat I see is how the final code is generated, unlike CoffeeScript which is more 1:1 with real JavaScript.

Re: PHP Short Syntax for Arrays: developers say no.

#46
post #4

Contra ... Not searchable through search engines That's a ridiculous argument.

Not being SEO friendly is an interesting argument. While learning Python, when things like list comprehensions came up in code I was reading, it was very hard for me to figure out how it worked when I couldn't Google the syntax.

I've always wanted a search engine that is optimized for searching for code embedded in web pages. AFAIK google code search isn't really an option because it only searches through code, not through blog posts, stack overflow, and other pages with code in them.

As far as language design goes though, I'd rather use a language that's optimized for writing code than for searching for it :).

Re: PHP Short Syntax for Arrays: developers say no.

#47
post #17

This does not seem reasonable. I mean that literally -- this feels more like a choice driven by culture than by reason. The cons seem nowhere near strong enough to counter the fact that the overwhelming majority of users want this syntax, and have been asking for it for years.

It's like they don't even _want_ to fix the language.

I catch myself feeling that way, too, but it is uncharitable and inaccurate. They do work a lot of work on developing the language. The issue is that sometimes their idea of what is should be differs from the idea that most people have.

Re: PHP Short Syntax for Arrays: developers say no.

#48
post #47

Earlier quoted context omitted.

It's like they don't even _want_ to fix the language.

I catch myself feeling that way, too, but it is uncharitable and inaccurate. They do work a lot of work on developing the language. The issue is that sometimes their idea of what is should be differs from the idea that most people have.

I don't think it's possible to be too uncharitable about the developers of PHP. Courtesy demands that we give them the benefit of the doubt; but by this stage there is very little doubt left, so very little benefit as well.

Re: PHP Short Syntax for Arrays: developers say no.

#49
post #4

Contra ... Not searchable through search engines That's a ridiculous argument.

Not when you consider how a large number of PHP programmers "program" on a day-to-day basis.

Can you imagine what PHP would be like if the developers insisted on pandering to the lowest common denominator like that?

Oh, wait...

Post reply on HN