Seeing this: > function add( ... ): float {} I think a much better choice would have been: > float function add( ... ) {} Or just: > float add( ... ) {} Since that's how it's done in other languages and people would feel at home with it.
Haxe uses the first syntax, as does AS3. So it's not like "other languages" are universally opposed to this order.
Things you should know about PHP 7
31–40 of 124 posts
Re: Things you should know about PHP 7
#32"You can put lipstick on a pig but it's still a pig" - Barack Obama on PHP in 2008
Re: Things you should know about PHP 7
#33Heck, I'm kinda felling bad as a Pythonista. We're lagging badly speed wise. Sure, there's PyPy but it's not compatible with the mainstream C-Extensions so pretty much a no-go for most of my projects. Hopefully Piston will come to rescue in the future.
Well, maybe you should review your stack. Which C extensions are you missing? There are alternatives for the most part (barring GUI)
Re: Things you should know about PHP 7
#34Earlier quoted context omitted.
Why?
The security implications and unpredictable resource availability never made it feasible to run a real production site from shared hosting.
You could say the exact same thing about VPS servers compared to dedicated hosting and be equally wrong. Please accept that there are different use cases that come with different solutions, of which shared hosting is one.
Re: Things you should know about PHP 7
#35TL;DR: 1. Scheduled to come out in Q4 2015 2. operator, see https://wiki.php.net/rfc/combined-comparison-operator 3. Return Type Declarations & Scalar Type Hints 4. Speed improvements (25-70%) 5. Yep, speed improvements are for real. You're welcome.
Thank you. This website is completely useless on mobile.
Re: Things you should know about PHP 7
#36Earlier quoted context omitted.
Why?
The security implications and unpredictable resource availability never made it feasible to run a real production site from shared hosting.
Good thing they didn't get your memo.
Re: Things you should know about PHP 7
#37Re: Things you should know about PHP 7
#38But competition is good, great actually. HHVM recently folded in JIT regex like PHP7, so they are copying from each other.
Re: Things you should know about PHP 7
#39Earlier quoted context omitted.
Thank you. This website is completely useless on mobile.
It's also completely blank without javascript.
Re: Things you should know about PHP 7
#40Seeing this: > function add( ... ): float {} I think a much better choice would have been: > float function add( ... ) {} Or just: > float add( ... ) {} Since that's how it's done in other languages and people would feel at home with it.
I thought that was rather odd as well. Are there many languages using this form of return type specifier?
It makes very little sense for PHP. A function definition now even has both styles:
`function foo(argtype arg) : rettype` instead of `function rettype foo(argtype arg)` or `function foo(arg : argtype) : rettype`.