News for hackers. Stuff that matters.
Re:REST and GraphQL framework to build API-driven projects by thinkindie on Monday June 17, 2019 @02:36AM (#20200437)
this comment is so 2005 and it is suggesting you haven't worked with the latest versions of PHP and the ecosystem around it. From a language perspective, PHP is not any worse than Ruby, Python or Javascript. Composer, Symfony and other libraries have improved PHP projects by a lot.
Re:REST and GraphQL framework to build API-driven projects by skrebbel on Monday June 17, 2019 @02:41AM (#20200468)
PHP is still super quirky and inconsistent though. You can't fix that without breaking backward compatibility.
Re:REST and GraphQL framework to build API-driven projects by kartan on Monday June 17, 2019 @02:49AM (#20200503)
JavaScript is still super quirky and inconsistent though. You can't fix that without breaking backward compatibility.
Re:REST and GraphQL framework to build API-driven projects by smt88 on Monday June 17, 2019 @04:31AM (#20200980)
All web devs used JavaScript because browsers forced us to. PHP is, and has always been, a choice.

As compile-to-JS has matured, many of us have switched to things like TypeScript. That kinda ruins your glib analogy.

Re:REST and GraphQL framework to build API-driven projects by dmix on Monday June 17, 2019 @04:12AM (#20200887)
Are you saying PHP has improved the way JavaScript has over the last decade?

The improvements in both the language/community plus how people are using JS since The Good Parts was quite a significant improvement.

But people largely went through that whole process because of the ubiquity of browsers not because JS was a good idea. There are so many better alternatives on the server side for web, I don’t see the point in PHP going through that whole renovation unless it’s to hire more and cheaper developers.

Re:REST and GraphQL framework to build API-driven projects by chii on Monday June 17, 2019 @07:55AM (#20202004)
> I don’t see the point in PHP going through that whole renovation unless it’s to hire more and cheaper developers.

and may be being cheaper to hire is a bigger importance than you'd care to admit. After all, the person paying the bills wants it to be as low as possible whilst still achieving the result. And they call the shots.

Re:REST and GraphQL framework to build API-driven projects by CuriouslyC on Monday June 17, 2019 @08:16AM (#20202121)
10 years ago, PHP was a good choice for small projects because hosting was much easier and there weren't a lot of cheap outsourced developers for other back-end languages. These days neither of those points is true.

PHP developers are cheap because in general they're very junior. Junior Javascript developers are cheap too.

Re:REST and GraphQL framework to build API-driven projects by cityzen on Monday June 17, 2019 @10:03AM (#20203040)
if you are still selling work based on language and not solutions then you are still jr level as well.
Re:REST and GraphQL framework to build API-driven projects by duiker101 on Monday June 17, 2019 @05:39AM (#20201275)
I have worked a lot in JavaScript before and I am pretty up to date with it. Recently I had to pick up PHP for work. I am tempted to say that PHP has become better than JavaScript. I was shock at the improvements.
Re:REST and GraphQL framework to build API-driven projects by jupp0r on Monday June 17, 2019 @10:06AM (#20203067)
That’s why people are either compiling from better languages like TypeScript or from modern JS via babel.
Re:REST and GraphQL framework to build API-driven projects by diminoten on Monday June 17, 2019 @04:24AM (#20200949)
Browsers hold figurative guns to our head forcing us to use JavaScript.
Re:REST and GraphQL framework to build API-driven projects by keymone on Monday June 17, 2019 @09:40AM (#20202802)
Yeah, there’s no reason a sane person should choose either of those.
Re:REST and GraphQL framework to build API-driven projects by dalore on Monday June 17, 2019 @06:05AM (#20201428)
But you can add extensions which make get rid of the inconsistencies and lets you treat it like you a in a modern version (Babel/etc).

But Javascript is compiled in the browser, by many browsers, and so is hard to nail down an environment.

PHP runs on the server which is pretty much a fixed environment. It has more options to it yet it feels like it hasn't made use of it.

Re:REST and GraphQL framework to build API-driven projects by loxs on Monday June 17, 2019 @06:01AM (#20201395)
All of the mentioned are incomparably inferior to TypeScript. You have to go to Go, Kotlin, Rust, Swift to actually compare language-wise (to TS) and still won't be able to compare with ability to code the backend and the frontend in the same language.
Re:REST and GraphQL framework to build API-driven projects by cutler on Monday June 17, 2019 @07:26AM (#20201850)
Not any worse if you don't mind wading through fanfold pages of code containing mostly doc comments, more blank lines than code and pseudo-Java verbosity. No thanks, I'll take Ruby or Python any day of the week.