|
http://bugs.php.net/bug.php?id=32100quote:Description: quote:We've had long discussions and came to the only conclusion that we don't need that, for more search the mailing list archieves.
|
# ? Dec 10, 2010 16:26 |
|
|
# ? Apr 27, 2024 08:38 |
|
Sweet Jesus. Don't they realize you can match on something else than all exceptions at once? PHP can have restricted exception matching by sub-classing exceptions and replacing the 'Exceptions $e' by 'YourOwnName $e', basically meaning you NEED a finally for these cases. The absence of the finally block has annoyed me forever when I still programmed PHP on a daily basis.
|
# ? Dec 10, 2010 17:10 |
|
There's really nothing you can say against that. It's like some idiot going on about Obama's birth place, or chemtrails, or creationists. They have absolutely no argument, just a bunch of loving crazy in their head with no premise. The problem is they can hoist their loving crazy on everyone.
|
# ? Dec 10, 2010 17:50 |
|
tef posted:Amazingly, I am in agreement. Man, mIRC script, I haven't been concatting strings to make arrays in ages. oh man, I wrote a couple RPG-style games in that poo poo. $player1hp = [ $player. [ $+ [ $nick ] $+ ] .currenthp ] When he finally put hashtables in I was loving ecstatic.
|
# ? Dec 10, 2010 18:22 |
|
Thanks for linking that post with php criticisms again, I bookmarked it this time because I remember spending half an evening trying to find the link about the someInt < INT_MAX check
|
# ? Dec 10, 2010 18:30 |
|
Wait are we seriously comparing php to mirc script?
|
# ? Dec 10, 2010 21:36 |
|
Janin posted:http://bugs.php.net/bug.php?id=32100 This made me IRL, like I had to grab my head and keep my brain from escaping.
|
# ? Dec 10, 2010 23:42 |
|
tef posted:basically the answer is: it depends. php may be terrible, but knowing the flaws of a tool allows you to apply it well if needed. most of the time all you're doing is writing a database skin so what the gently caress does it really matter I bet you could make a badass db skin in lisp
|
# ? Dec 10, 2010 23:43 |
|
Janin posted:http://bugs.php.net/bug.php?id=32100 Ahahaha people still use this language willingly
|
# ? Dec 11, 2010 00:06 |
|
PHP is a better language than coldfusion.
|
# ? Dec 11, 2010 00:23 |
|
ironypolice posted:coldfusion.
|
# ? Dec 11, 2010 02:26 |
|
Ada is a better language than PHP.
|
# ? Dec 11, 2010 02:32 |
|
So now wait a minute they came to the conclusion thatcode:
code:
Goddamnit PHP.
|
# ? Dec 11, 2010 02:39 |
|
NotShadowStar posted:Yeah a bit contrived but simple and to the point. Sorry about your locked tables until a database admin gets in and unlocks them. If there was a finally {} it would always, always, always unlock tables before rethrowing.
|
# ? Dec 11, 2010 02:49 |
|
PHP's as good a conversation subject as it is a programming language.
|
# ? Dec 11, 2010 03:08 |
|
Mr. Wynand posted:I bet you could make a badass db skin in lisp christ no, why does this poo poo even require programming?
|
# ? Dec 11, 2010 03:39 |
|
Surface posted:
|
# ? Dec 11, 2010 04:14 |
|
Janin posted:The whole point of his example is "// do nothing here". The PHP developers believe ignoring errors is "absolutley equivalent" to the original code IF YOU IGNORE EXCEPTIONS THEN WHY loving USE THEM. gently caress. PHP makes me angry IRL.
|
# ? Dec 11, 2010 04:14 |
|
Without exceptions, it's too hard to have each page prefixed by random garbage
|
# ? Dec 11, 2010 04:41 |
|
Hammerite posted:The whole "omg PHP type-juggling" thing is a bit of a dead horse isn't it? Yeah it's not always terribly consistent, it's meant to allow you to Get poo poo Done quickly. It's not necessarily optimised for that, but it doesn't do too badly. It does give you ways to compare things carefully when you need to do so. Yeah, I forgot "gently caress my life" == 0 really helps make websites faster :?:
|
# ? Dec 11, 2010 06:43 |
|
king_kilr posted:Yeah, I forgot "gently caress my life" == 0 really helps make websites faster :?: Well it does since it doesn't cause those pesky error messages.
|
# ? Dec 11, 2010 07:39 |
|
king_kilr posted:Yeah, I forgot "gently caress my life" == 0 really helps make websites faster :?: I interpreted this as: "Your post is wrong, because type-juggling does not cause websites to run more quickly". This is a misunderstanding of my post - my implication is that it makes some general-purpose scripts easier to program (where strict attention to the types of data is not required). That is, writing code can be faster. There are many situations in which type-safety is required, in which case it is available. Hammerite fucked around with this message at 16:40 on Dec 11, 2010 |
# ? Dec 11, 2010 16:34 |
|
It's obvious that php sucks and should just be burned and ever used. Guess I'll use .net
|
# ? Dec 11, 2010 16:36 |
|
Hammerite posted:I interpreted this as: "Your post is wrong, because type-juggling does not cause websites to run more quickly". This is a misunderstanding of my post - my implication is that it makes some general-purpose scripts easier to program (where strict attention to the types of data is not required). That is, writing code can be faster. I don't think anyone is saying that type juggling shouldn't be an option. They're saying it shouldn't be the default behavior, and that "==" shouldn't be called an equality operator in the documentation of the language. I know you can't compare languages 1:1 all the time, but someone coming to PHP from any other language is bound to not understand the intricacies of "==" vs "===". They'll use "==" like they're used to without realizing that the thing that's going to behave like they're accustomed to is actually "===".
|
# ? Dec 11, 2010 16:51 |
|
ErIog posted:I don't think anyone is saying that type juggling shouldn't be an option. They're saying it shouldn't be the default behavior, and that "==" shouldn't be called an equality operator in the documentation of the language. I know you can't compare languages 1:1 all the time, but someone coming to PHP from any other language is bound to not understand the intricacies of "==" vs "===". They'll use "==" like they're used to without realizing that the thing that's going to behave like they're accustomed to is actually "===". I agree with this post.
|
# ? Dec 11, 2010 16:56 |
|
Easy Mac posted:Sounds like php is terrible and should never be used. What is the ultimate language to use for the web. Python I think PHP is useful as an object lesson, it demonstrates that the success of a language has little to do with the language design and more with stuff like the size of its ecosystem and user base and simple path dependence.
|
# ? Dec 12, 2010 01:26 |
|
DirtyDiaperMask posted:Python But at some point, PHP didn't have an ecosystem or a user base.
|
# ? Dec 12, 2010 02:35 |
|
Wheany posted:But at some point, PHP didn't have an ecosystem or a user base. At that time, wasn't the choice for web scripting pretty much between PHP, Perl 5.0, TCL, and C (yes, people wrote CGI programs in C) where PHP handled CGI and (to some extent) templating for you while the others made you do it all yourself? In that context, PHP was the sane choice. Mr.Radar fucked around with this message at 03:16 on Dec 12, 2010 |
# ? Dec 12, 2010 03:11 |
|
Hammerite posted:There are many situations in which type-safety is required, in which case it is available. If I ever need to parse phone numbers in octal to make a comparison, i'll use php
|
# ? Dec 12, 2010 05:00 |
|
The weird bit I don't hear other people who write websites or code wishing for php's == vs === in other languages. And yet somehow 'it's useful'. It is a false utility - you exchange a legion of bugs for a handful of keypresses.
|
# ? Dec 12, 2010 05:03 |
|
tef posted:The weird bit I think it's like Java developers claiming that anonymous inner classes are "useful".
|
# ? Dec 12, 2010 05:07 |
|
Jabor posted:I think it's like Java developers claiming that anonymous inner classes are "useful". It is ... uh ..... Now I feel bad
|
# ? Dec 12, 2010 06:19 |
|
Anonymous inner classes are kind of useful, they are a perfect analogue to anonymous functions that capture scope, which everybody is a fan of.
|
# ? Dec 12, 2010 15:41 |
|
Vanadium posted:Anonymous inner classes are kind of useful, they are a perfect analogue to anonymous functions that capture scope, which everybody is a fan of. This. They're lambdas expressed exactly how the vm would see them. The syntax is also perfectly in line with the rest of Java: extra verbose every time you use it for the sake of consistency with the one time in a hundred when you want to make use of one of the extra capabilities of the feature.
|
# ? Dec 12, 2010 18:40 |
|
Obligatory kneejerk "java's new Runnable() { public static void run() { } } is equivalent to haskell's " syntax complaint
|
# ? Dec 12, 2010 18:49 |
|
Karanth posted:This. They're lambdas expressed exactly how the vm would see them. The syntax is also perfectly in line with the rest of Java: extra verbose every time you use it for the sake of consistency with the one time in a hundred when you want to make use of one of the extra capabilities of the feature. Java 7 code:
|
# ? Dec 12, 2010 18:54 |
|
NotShadowStar: Closures are most likely going to wait for Java 8, and thankfully there have been a number of syntax proposals which aren't that nasty looking.
|
# ? Dec 12, 2010 18:59 |
|
It should be, like, [](Number x)(whatever) Edit: I mean, it is important to maintain compatibility with C++, as "as C++ and Java have bunch of similarities, a copy and paste of the source code with a few modifications should be enough to convert and recompile it" (non-coder non-code quote, probably cheating) Vanadium fucked around with this message at 19:14 on Dec 12, 2010 |
# ? Dec 12, 2010 19:09 |
|
Vanadium posted:Obligatory kneejerk "java's new Runnable() { public static void run() { } } is equivalent to haskell's " syntax complaint I used to do this until I read this in the Javadoc of Runnable: quote:The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. Unless you're giving it to a Thread object to run, come up with your own interface to implement. I know that, in reality, someone will probably never use your Runnable object inappropriately, but it seems like a violation of the interface contract to treat any Runnable object as a closure. Not to mention, it potentially makes your code more confusing. Runnable's definition of behavior is so vague that, if you have an object that takes a Runnable object, it may not be immediately clear what the purpose of that received Runnable object should be. I know, people can read your Javadoc, but every little bit of ambiguity can add up...
|
# ? Dec 12, 2010 21:05 |
|
|
# ? Apr 27, 2024 08:38 |
|
tef posted:The weird bit In Rome... Other languages usually have some kind of coping mechanism for converting HTTP headers into something different and usable. It is not very useful, which is why I'd guess most people don't need them the same way they might need higher order functions or closures, which are objectively much harder to replace when it comes to abstractions. There's a spectrum between "I use this all the time" and "I wouldn't notice if it wasn't there". '==' isn't rated very high on that spectrum.
|
# ? Dec 13, 2010 06:10 |