Live data from Hacker News

PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

bugs.php.net

41–50 of 135 posts

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#41
post #24

That's why, for example, .NET world has .ToLowerInvariant() and .ToUpperInvariant() and developers are advised to use it when doing internal stuff. Interpreting / parsing a language is clearly an internal task and shouldn't be affected by locale changes.

Yep. .NET also has a nice set of string comparison classes for dictionary lookups to avoid exactly this kind of thing.

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#42
What was the advantage of case insensitive class and function names? Sounds to me like someone that was implementing very early on without great reasons and them kept for backwards comparability. In all my programming in PHP I have never thought to take advantage of this.

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#44
If there are so many people depending on PHP and all the code written in PHP in all of Turkey, why doesnt someone in Turkey fix the problem?

Or anywhere for that matter?

There is no "they" in this equation. There is no person who should be held more accountable than you or I for fixing this problem.

The choices are simple:

1) Fix the problem

2) Find a work around

3) Don't use PHP

What's that? There is a lot of open source software that you wanted to use for free that's written in PHP that does just what you need except for this tiny little trivial thing that should be easy to fix? Well too bad!

Trade off the cost of fixing it against the cost of rewriting the big, free, open source package that's written in PHP you wanted to use, in the programming language of your choice, and stop complaining.

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#45
Please stop telling PHP is a crap. News on the topic are damn to high. Think that PHP coders are beginning to migrate to stuff like python and that most of them don't want to learn programming, they still want to monkey write program and that through trial and errors it works. I am on a one of the #python-xx irc channel, it is an horror.

PHP is cool, it is useful, it is a magnet for bad developers. This way they don't pollute our ecosystems.

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#46
post #44

If there are so many people depending on PHP and all the code written in PHP in all of Turkey, why doesnt someone in Turkey fix the problem? Or anywhere for that matter? There is no "they" in this equation. There is no person who should be held more accountable than you or I for fixing this problem. The choices are simple: 1) Fix the problem 2) Find a work around 3) Don't use PHP What's that? There is a lot of open s…

You are the only reasonable voice on the matter I've heard so far. Infinite upvotes from me.

We all know PHP has its shortcomings, but there appears to be a witch hunt going on here.

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#47
post #42

What was the advantage of case insensitive class and function names? Sounds to me like someone that was implementing very early on without great reasons and them kept for backwards comparability. In all my programming in PHP I have never thought to take advantage of this.

I'm assuming the original reason is lost in the mists of time, but one advantage it has when calling/using external/3rd party code is in style conventions. If in my code my convention is to use functionNames but in yours you use functionames or FunctionNames, I can still code in my style after include()ing your file. A small advantage, granted.

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#48
post #23

Earlier quoted context omitted.

I believe it's because PHP supports case insensitive class names. It sounds like this will not change: https://bugs.php.net/bug.php?id=26575&edit=1

Class and function names are case insensitive. But variables are not. Go figure that one out.

I'd prefer them both to be one way or the other, but if they have to be different this is the right way to do it. For instance, functions can check to see what name the were called by (and process the call differently if we want to distinguish between cases). Variables can't do that so we must explicitly distinguish between them.

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#49
post #11

PHP is a big legacy open source project, worked on by many volunteers whenever they can spare the time, just like any other open source project. It is wildly successful despite this and many other bugs. I only wish that the people who spend as much time attacking PHP and it's developers endlessly would instead focus some of that energy into helping to improve PHP, but I guess some of us are just negatively charged. S…

PHP can not be improved. An "improved PHP" would be completely different language, and probably a rewrite of the codebase. The difference between "improved PHP" and PHP as it stands today would at least as great as the difference between Perl and Perl6.

And if you are going to design a new language (that's what "improved PHP" would be), you have very little to gain in basing your work on PHP. The ecosystem is in the current PHP, and it is as likely to transition to completely different language as it would be to transition to your "improved PHP".

Re: PHP Bug #18556 : Setting locale to 'tr_TR' lowercases class names

#50
post #28
post #21

Earlier quoted context omitted.

I don't think those people understand the economics of programming languages. It's not going to die off any time soon, what with all the thousands of companies that use it, and zillions of lines of code. As someone who would rather not ever work with PHP again, the best thing is to simply focus on other languages and environments, helping to bolster those ecosystems.

Agreed, but publicising stupid problems with PHP actually does help that cause - it might push someone who's "on the fence" over to using a better system.

I'm one of those on the fence. I've spent most of my programming life working on PHP and the recent barrage of negativity against PHP has made me more interested in learning another language, if just to make an educated comparison and see whether I am continue to use PHP "because I know it" or because it is actually good.

I'm currently having a go at Python + Flask in my spare time.

Post reply on HN