What's it been, 20 years?
If you read the article you would have known this. It is literally the first three sentences they cover this.
Why yes, that does remind me why I chose other languages.
101–110 of 263 posts
What's it been, 20 years?
If you read the article you would have known this. It is literally the first three sentences they cover this.
Why yes, that does remind me why I chose other languages.
Earlier quoted context omitted.
There are languages that everybody hates, and then there are the languages nobody uses.
There are languages whose communities everybody hates, but it doesn't seem to be that everybody hates Ruby or Clojure or whatever. Just that everybody hates their trendiness.
After recently having to work with modern PHP, I have to say a lot of the criticism of the language is unfounded. It's changed a lot since I first used it. But the stdlib is still hard to manage. Different naming conventions, different order on the parameters for functions that do almost the same thing, and every function is global. Couldn't they keep all that for backwards compatibility, but create more sane wrapper…
> It's changed a lot since I first used it. Have any good examples? I haven't used the language in years, would love to see what "modern" PHP looks like. (Seriously, not trolling at all)
This is great news for the PHP community, and I for one applaud their effort. Contrary to what many HN hipsters seems to believe, PHP is quite a capable language, and HHVM / Hack is really pushing things forward. * Hack introduces type hinting, imo the major lacking part in PHP. * HHVM introduces speed to php. On a personal project calculating perlin noise, I got about 8x speedup on HHVM. * The specification helps pa…
> Contrary to what many HN hipsters seems to believe, PHP is quite a capable language, and HHVM / Hack is really pushing things forward. This attitude really frustrates me. I'm a developer with over 20 years of experience. I don't use PHP because (a) I have had poor experiences with it in the past, (b) I am enjoying my current stack (Java8/Clojure/Groovy), and (c) would go with stacks like RoR over PHP if I had to ch…
I'm afraid they're going to have to show me reasons it's actually superior to other languages before I'm going to jump on the train. This "it's less broken than it's ever been" stuff isn't going to cut it.
One thing that makes me chuckle every time I decide to give PHP a fair glance again is "<?php" at the beginning of all the source files. It's hilarious to me that with all the well understood best practices about separation of logic and presentation, people are still seriously using a language where you have to use a little signal to the compiler that means "ok, here's where the HTML stops and the code begins!" I assume at this point it's a vestigial tail, but it's just one irritating reminder that this language was originally designed for half-ass hacks.
Earlier quoted context omitted.
There are many other options, none of which enjoy the ubiquity of PHP (as far as being installed on such a vast majority of hosts). The barrier to entry is higher if you want to run a site on something else. That is the sole reason PHP is as popular as it is and part of the reason why it stays popular and powers so many of the internet's top websites. Other reasons why it stays popular is that they really have improv…
> none of which enjoy the ubiquity of PHP (as far as being installed on such a vast majority of hosts). So, choose the language based on the ease of the first 15 minutes of your startup?
That's the lesson I'd love to see other ecosystems learn. PHP, by being very novice-friendly, has developed an enormous user base. How much better off would those people be if they had started with a language that was awesome not just for starting, but for the long term?
(As an aside, I'm throwing no stones here. My first programming language was BASIC, and it took me a long time to unlearn the bad habits it gave me.)
Earlier quoted context omitted.
To be fair, all languages are "a bit quirky". It gets worse when you start including things that are in the PHP stdlib but aren't in other languages by default. [e.g. When they basically re-implement how php-fpm handles requests and thread safety]
>>> To be fair, all languages are "a bit quirky". Agreed. These are just a few quirks in PHP I find amusing.
Last I checked, it wasn't quite as good as wtfjs, but it looks like quite a few new surprises have been added rather recently.
Edit: Correction, there's only one new entry as of this year, which is a shame. :)
Earlier quoted context omitted.
There are many other options, none of which enjoy the ubiquity of PHP (as far as being installed on such a vast majority of hosts). The barrier to entry is higher if you want to run a site on something else. That is the sole reason PHP is as popular as it is and part of the reason why it stays popular and powers so many of the internet's top websites. Other reasons why it stays popular is that they really have improv…
> none of which enjoy the ubiquity of PHP (as far as being installed on such a vast majority of hosts). So, choose the language based on the ease of the first 15 minutes of your startup?
It's really more about the talent of your team than the language you choose to write your app(s) in.
Earlier quoted context omitted.
> It's changed a lot since I first used it. Have any good examples? I haven't used the language in years, would love to see what "modern" PHP looks like. (Seriously, not trolling at all)
The Laravel framework[1] is a good place to start, it's quite well designed and elegent. It requires at least PHP 5.4. [1] http://laravel.com/
After recently having to work with modern PHP, I have to say a lot of the criticism of the language is unfounded. It's changed a lot since I first used it. But the stdlib is still hard to manage. Different naming conventions, different order on the parameters for functions that do almost the same thing, and every function is global. Couldn't they keep all that for backwards compatibility, but create more sane wrapper…
Fun with PHP: $a = 'b'; $b = 'a'; echo $a."\n"; >>> b echo $$a."\n"; >>> a echo $$$a."\n"; >>> b Yaaa $obj = new StdClass(); $obj->x = 1; function x_plus_one($obj) { $obj->x++; } x_plus_one($obj); var_dump($obj); >>> object(stdClass)#1 (1) { >>> ["x"]=> >>> int(2) >>> } Huh? A local change to the object changed the object outside the local scope? It must have been passed by reference... function null_the_object($obj)…
Earlier quoted context omitted.
>>> To be fair, all languages are "a bit quirky". Agreed. These are just a few quirks in PHP I find amusing.
I'm sure you've already seen this (it's been around a while), but if not, you'll find it amusing: http://www.phpwtf.org/ Last I checked, it wasn't quite as good as wtfjs, but it looks like quite a few new surprises have been added rather recently. Edit: Correction, there's only one new entry as of this year, which is a shame. :)