4 ms·
That title reads like "I got tired of punching myself in the face and kidney, so I tried punching myself in the crotch". I love it.
by munificent 8y ago
That title reads like "I got tired of punching myself in the face and kidney, so I tried punching myself in the crotch".
I love it.
- svnpenn 8y agoThat's exactly how I read it. Php and Perl are really from a time gone by. neither have REPL. php doesn't even have to a proper print command, you have to add your own newline. Granted they are both quite fast, but with perls "write only" syntax I would only use either of them for the most basic of scripts.
- nicoburns 8y agoPHP has a repl https://github.com/bobthecow/psysh https://github.com/bobthecow/psysh
- empyrical 8y agoAlso, `php-cli` has a very basic REPL which can be accessed using `php -a`.
- ambicapter 8y agoRemember to terminate every line with a semicolon, and enjoy quirks like true printing boolean(true) and false printing nothing at all.
- carmate383 8y agoExcept that PHP does have a REPL, and using PHP_EOL is hardly a big deal. PHP induces an undeserved gag-reflex for most Ruby / Python / JS devs because they read some "why php sucks" post on someone's blog ten years ago, but really the language is quite modern now (not to mention faster).
- TazeTSchnitzel 8y agoThe fundamentals of why PHP is disliked have not changed. It is still covered in annoying problems, though there have been substantial improvements in some areas. It's less painful, but it's still the infamous PHP.
- taneq 8y agoI thought PHP was disliked because its flexibility can lead to horrible code if it's used without discipline, and for a long time its default settings were completely insecure? I don't recall hearing any serious criticism claiming that it was hard to get things done with (unless you count security).
- jes5199 8y agothere are some design decisions, in the core language, that cause pervasive weirdness that’s hard to code around. It’s worse that “too permissive” - it’s like there are bad defaults that you have to constantly fight against
- NightlyDev 8y agoSome examples? I can't think of any.
- fletchowns 8y agoAt least PHP doesn't have the whole Python 2 vs. Python 3 fiasco. And a gazillion different ways to package and install dependencies. Don't get me wrong, I love Python but every language has its warts.
- code_duck 8y agoTrue, PHP never made a clean break with its legacy, unlike Python. That’s not positive.
- 8y ago
- peterwwillis 8y agoThis position only really holds up if you don't know either language well. For example, I guess you didn't know there are PHP and Perl REPLs? And robust OO code is not only possible in Perl, but there's tens of thousands of very reusable Perl modules that have stood up over time much better than Python or Node modules have.
- simula67 8y agoOthers have pointed to PHP REPLs. Perl 5 also has a REPL : https://metacpan.org/pod/Devel::REPL https://metacpan.org/pod/Devel::REPL. Perl 6 comes with a REPL built-in. Unlike Python/Ruby, Perl does not have a GIL and with some discipline it can be used in large programs.
- cutler 8y agoRuby's built-in REPL is irb.
- goliatone 8y agoI’ll leave BoB[1] here as a reference for the OPs comment [1] https://news.ycombinator.com/item?id=2781019 https://news.ycombinator.com/item?id=2781019
- quickthrower2 8y agoCame here to say something like that, but my analogy was far more vulgar.
- waterhouse 8y agoSecond commit to the repo: Initial commit of a really stupid idea. computerx138 committed on Mar 6