|
code:
|
# ? Feb 3, 2016 19:15 |
|
|
# ? May 14, 2024 12:41 |
|
The real horror is that 'try' is a reserved word in pretty much all modern languages so it will never compile.
|
# ? Feb 3, 2016 19:28 |
|
Dessert Rose posted:This actually seems fine? Breaks out of the loop if try() returns true, and assigns it to succeed. keep on doing nothing until you make an effort. all we care about is whether an effort was made, not what was attempted, and whether or not you make an effort depends entirely on external factors beyond our control.
|
# ? Feb 3, 2016 19:30 |
|
CPColin posted:Except you're always trying at least once, but the saying says to try only if you don't succeed first. Are you familiar with the meaning of the word "again?"
|
# ? Feb 3, 2016 19:44 |
|
Are you familiar with the meaning of the phrase "if at first"?
|
# ? Feb 3, 2016 20:04 |
|
xzzy posted:The real horror is that 'try' is a reserved word in pretty much all modern languages so it will never compile. Works as intended - it clearly means that there's no point in trying
|
# ? Feb 3, 2016 20:04 |
|
xzzy posted:The real horror is that 'try' is a reserved word in pretty much all modern languages so it will never compile.
|
# ? Feb 3, 2016 20:27 |
|
Yup, perfectly legal in PHP7 thanks to improvements to the lexer to make the reserved keyword list context sensitive.
|
# ? Feb 3, 2016 20:45 |
|
I was reading a job posting and got to the part that said, "Our code is highly structured PHP." and closed it.
|
# ? Feb 3, 2016 20:52 |
|
Some of the world's largest sites (and porn streaming sites) run on PHP. Why the hate? It's not even close to how terrible it was as I remember writing PHP 5.2 in primary school. Now there's things like composer and async and await and future and promise.
|
# ? Feb 3, 2016 20:55 |
|
Biowarfare posted:porn streaming sites run on PHP. Whoa!
|
# ? Feb 3, 2016 21:07 |
|
Biowarfare posted:Some of the world's largest sites (and porn streaming sites) run on PHP. Why the hate? It's not even close to how terrible it was as I remember writing PHP 5.2 in primary school. Now there's things like composer and async and await and future and promise. PHP dev spotted.
|
# ? Feb 3, 2016 21:09 |
|
php is like living with your parents, if it's all you know it seems fine because everything you need is made available to you and life seems pretty good. Sure you gotta do the dishes and take out the trash, but there's no real responsibility. But then you go out into the world and experience what life has to offer and it's over.. if you try to move back in it's awkward and you feel like a failure and you hate all the snarky comments.
|
# ? Feb 3, 2016 21:21 |
|
McGlockenshire posted:Yup, perfectly legal in PHP7 thanks to improvements to the lexer to make the reserved keyword list context sensitive. I'm going tot go ahead and take issue with your use of the word "improvements". Or to put it another way, Parse error: syntax error unexpected T_SHFVRM
|
# ? Feb 3, 2016 21:35 |
|
xzzy posted:php is like living with your parents, if it's all you know it seems fine because everything you need is made available to you and life seems pretty good. Sure you gotta do the dishes and take out the trash, but there's no real responsibility. My formal first class intro to cs was python 3 (and scheme), and I've liked that ever since. Tried out clojure, wrote some actual things in python. But I still occasionally visit with PHP and notice that the house has gotten nicer and they've moved out of detroit. I mean, it's still a mess and overcrowded, but at least they're making an effort. I mean, honestly, there is nowhere else you will get the same amount of language support if you're catering to the lowest common denominator -- 99% of people deploying things like Wp, phpBB, etc have no idea what git, ssh, or anything like that is. Impotence fucked around with this message at 21:42 on Feb 3, 2016 |
# ? Feb 3, 2016 21:40 |
|
Munkeymon posted:I'm going tot go ahead and take issue with your use of the word "improvements". Or to put it another way, Parse error: syntax error unexpected T_SHFVRM Similarly, T_PAAMAYIM_NEKUDOTAYIM is the dumbest, spergiest loving thing to put in an otherwise english-language set of errors. How the gently caress, other than seeing it enough to know what it means or googling it, is anyone who doesn't know Hebrew supposed to know that it means "double colon"? One of the worst "features" in PHP by far.
|
# ? Feb 3, 2016 21:43 |
|
Kazinsal posted:Similarly, T_PAAMAYIM_NEKUDOTAYIM is the dumbest, spergiest loving thing to put in an otherwise english-language set of errors. How the gently caress, other than seeing it enough to know what it means or googling it, is anyone who doesn't know Hebrew supposed to know that it means "double colon"? I had to google that keyword and found this bit of history. Holy loving poo poo these people are in charge of PHP?
|
# ? Feb 3, 2016 21:52 |
|
Kazinsal posted:Similarly, T_PAAMAYIM_NEKUDOTAYIM is the dumbest, spergiest loving thing to put in an otherwise english-language set of errors. How the gently caress, other than seeing it enough to know what it means or googling it, is anyone who doesn't know Hebrew supposed to know that it means "double colon"? And I think they still haven't removed it because it might confuse/scare people who are used to seeing it
|
# ? Feb 3, 2016 21:52 |
|
Kazinsal posted:Similarly, T_PAAMAYIM_NEKUDOTAYIM is the dumbest, spergiest loving thing to put in an otherwise english-language set of errors. How the gently caress, other than seeing it enough to know what it means or googling it, is anyone who doesn't know Hebrew supposed to know that it means "double colon"? syntax error, unexpected '::' for 4 years now edit: does stockolm syndrome exist for programming lagnuages
|
# ? Feb 3, 2016 21:52 |
|
CPColin posted:Except you're always trying at least once, but the saying says to try only if you don't succeed first. How can you succeed if you don't try in the first place? Trying the first time is implied. e: oh look, a second page.
|
# ? Feb 3, 2016 22:37 |
|
Because succeed() and try() are two different functions, obviously!
|
# ? Feb 3, 2016 22:45 |
|
I'm glad there are people making a concerted effort to make PHP less poo poo but suspect that it's a lost cause. out of curiosity, one of the more irritating things about PHP (in terms of practical problems using the language) is the overabundance of standard library functions with inconsistent names and argument conventions. is there any fork of PHP or set of custom defs aimed at offering a more consistent package of functions wrapping or replacing the standard library functionality? As in, if you use this fork (or include this file, or whatever) you get a set of global function names (might just be shims around the real standard library) that offer the functionality in the standard library but with better thought-out (or at least more consistent) naming and argument-order conventions.
|
# ? Feb 4, 2016 01:13 |
|
just a reminder that the php standard library names are inconsistent because rasmus changed the function names to achieve a better hash distribution for his hashing function of string length
|
# ? Feb 4, 2016 02:09 |
|
Just a reminder that most plangs are poo poo and 99% of the complaints in this thread about PHP can be solved by using an IDE that will show you function signatures. This basically bring it up to the same tier as python, another poo poo plang.
|
# ? Feb 4, 2016 02:18 |
|
Notorious R.I.M. posted:Just a reminder that most plangs are poo poo and 99% of the complaints in this thread about PHP can be solved by using an IDE that will show you function signatures. This basically bring it up to the same tier as python, another poo poo plang. Uh, I don't think you understand what's wrong with PHP as a language. hth
|
# ? Feb 4, 2016 02:34 |
|
Cuntpunch posted:Uh, I don't think you understand what's wrong with PHP as a language. hth Good job linking to a 4 year old article about PHP 5.3. Your first homework assignment is to figure out how much is still relevant to PHP 5.6. PHP has a lot of poo poo problems. Its ecosystem sucks outside of webdev. Writing CLI applications in PHP is a total nightmare compared to Python where you have libraries like Click that make everything easy. In fact, it has no numerics libraries or really any other libraries outside of interacting with a RDBMS and making GBS threads out web apps. It is, however, pretty good at making GBS threads out web apps, and it works for a lot of large sites that have really rigid performance demands on their web applications. HHVM provides a good JIT as well. A lot of the problems that your link assigns to PHP are problems that show up in pretty much any dynamically typed, interpreted languages. Outside of that we get complaints like "PHP has a === operator" from the same people that for some reason don't complain about Python having both a "==" and "is" operator. If you want to sit in an ivory tower made of Haskell and rant about these warts, then you have a point. But if you aren't similarly going to poo poo on any other plang for their stupid design decisions then you're simply complaining about PHP because someone else complained about PHP and you thought that was a cool thing to do. Liking to this article instead of talking about PHP's dead-end ecosystem shows that you really don't understand what is wrong with PHP. PHP will die for the same reason Ruby will -- it's failed outside of a few niches and it'll be on life support until those last domain specific use cases dry up. Hell, at least Ruby is still used for Chef and Puppet. PHP doesn't have anything outside of webdev going for it. Notorious R.I.M. fucked around with this message at 03:28 on Feb 4, 2016 |
# ? Feb 4, 2016 03:03 |
|
Just use Hack.
|
# ? Feb 4, 2016 05:02 |
|
Notorious R.I.M. posted:we get complaints like "PHP has a === operator" from the same people that for some reason don't complain about Python having both a "==" and "is" operator.
|
# ? Feb 4, 2016 06:13 |
|
Do you mean value equivalence? PHP's operators let you test for value equivalence and object identity, basically. I don't think having == and eq would really be cleaner, but it would let people point at Lisp in defense.
|
# ? Feb 4, 2016 06:18 |
|
Subjunctive posted:Sometimes writing a unit test involves having to hook the OS, or simulate complex hardware. Not everyone is set up to write a dummy USB driver. Yep. A job I had a bunch of years ago, involved writing device drivers for embedded linux boards in pan tilt camera heads (The hardware needed low level access to DMA so it wasnt as simple as driving a serial line from user space, alas). Boss wanted it all to be unit tested. Good idea, until I realised I had no loving idea how to mock up a god drat operating system kernel. We kind of fudged it a bit.
|
# ? Feb 4, 2016 06:42 |
|
Yeah, this time last year I was helping design record+replay for a set of devices that got their signals fused together a couple of hundred times per second, on 3 operating systems. You know what's "good enough"? Good enough, that's what.
|
# ? Feb 4, 2016 06:47 |
|
Subjunctive posted:Just use Hack. The problem with hack is it solves the wrong problems. Well mostly. I mean the static typing is good. PHP definately needs that. But its focus on performance isnt really that useful unless your running google or facebook. The problem with PHP is its inconsistency. Its the only language I know where despite using it for a decade I have to keep looking up functions because I cant remember what order the parameters go. Its "best" frameworks are symfony which seems like it was designed by twirly moustached Java villains and has serious troubles downscaling and Laravel which has *serious* troubles upscaling and an ecosystem that revolves almost solely on web dev and is composed of horrifically poorly written modules that get spat out in one revision and then abandoned. And Hack cant fix any of that.
|
# ? Feb 4, 2016 06:50 |
|
I'm not sure how much of our stdlib is in Hack, but stuff like collections make things more regular. Most of the core PHP API catastrophe is hidden from developers at FB, but I agree that it's a real weakness.
|
# ? Feb 4, 2016 07:46 |
|
Notorious R.I.M. posted:Good job linking to a 4 year old article about PHP 5.3. Your first homework assignment is to figure out how much is still relevant to PHP 5.6. Why would it be surprising that a language that was originally created to handle the dynamic parts of some guy's web page, and which has always been aimed primarily at scripting web pages, doesn't really do anything other than scripting web pages? Who seriously wants to write a command line app in PHP, unless it's as an afterthought to some web app they already have and uses common code? PHP is lovely but being specialised to a particular use case is not, in and of itself, a lovely aspect of it. PHP has never had anything outside of webdev going for it and nobody other than you is surprised by this.
|
# ? Feb 4, 2016 10:30 |
|
Notorious R.I.M. posted:Just a reminder that most plangs are poo poo and 99% of the complaints in this thread about PHP can be solved by using an IDE that will show you function signatures. This basically bring it up to the same tier as python, another poo poo plang. You can give a cripple man crutches, but he will still be a cripple.
|
# ? Feb 4, 2016 14:06 |
|
xzzy posted:The real horror is that 'try' is a reserved word in pretty much all modern languages so it will never compile. It's perfectly valid ANSI C
|
# ? Feb 4, 2016 14:39 |
|
Notorious R.I.M. posted:Good job linking to a 4 year old article about PHP 5.3. Your first homework assignment is to figure out how much is still relevant to PHP 5.6. This is hilarious. Because your entire premise is 'all languages suck PHP is no worse' - while completely ignoring the major, enormously central point of that entire (infamous) article: Unlike almost every other major language, PHP doesn't come from a place of reasoned design. And they insist on trying desperately maintain some compatibility even between major versions so you *still* end up with things being a convoluted clusterfuck of "well it was like that 10 years ago..." - see things like *Standard Library Functions* having no consistency: strpos(which also has stripos - what's the difference? READ THE MANUAL) compared to str_split; array_map and array_filter both taking the same parameters - but in opposite order! Etc, etc. Even skipping an entire major version(6) to try and 'draw a line' - they *still* refuse to revisit fixing the standard library for these old fuckups. Look, developer to developer, we have both probably worked with peers who fall into two camps: On one hand you have "I'm going to consider my changes, understand their impact, and then make them." and on the other you have "gently caress it, let's get this change checked in as fast as possible" - PHP's *core functionality* behaves like the latter. It's why it's pretty widely derided - usually there's at least *some* sort of *reasoning* behind the rough edges of other languages - with PHP the answer tends to be "eh, that's how it got implemented. it works. what's your problem?"
|
# ? Feb 4, 2016 15:09 |
|
Notorious R.I.M. posted:PHP will die for the same reason Ruby will -- it's failed outside of a few niches and it'll be on life support until those last domain specific use cases dry up.
|
# ? Feb 4, 2016 17:22 |
|
ExcessBLarg! posted:Die? Not really sure how that works. None of the "plangs" are actually dead, Perl 5, Python, Ruby, and PHP are all very much around. As much as I would probably like to see PHP go away, it's so widely used it probably never will. Tcl might be dead. Not as long as expect uses it, it isn't.
|
# ? Feb 4, 2016 17:46 |
|
|
# ? May 14, 2024 12:41 |
|
ExcessBLarg! posted:Die? Not really sure how that works. None of the "plangs" are actually dead, Perl 5, Python, Ruby, and PHP are all very much around. As much as I would probably like to see PHP go away, it's so widely used it probably never will. Tcl might be dead. Tcl is integrated into most EDA tools for FPGA and ASIC design. A niche market, but an important one. We also tend to use lots of Perl 5.
|
# ? Feb 4, 2016 18:56 |