Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-24 Thread Sara Golemon
> Ad hominem ad infinitum...
>
Okay kids.  You're both very big boys with reasons and arguments and
you're both clearly the smartest.
Now, how about we all respect that neither of you is going to convince
the other.

Any further bickering and name calling is just bickering and name calling.

Let's pretend we're adults.

-Sara

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-24 Thread Alain Williams
On Sun, Sep 24, 2017 at 11:52:49AM +0100, Lester Caine wrote:

> That sums it up nicely Alain ...
> Now the question is actually ... do we stay in the dark ages of single
> byte character sets or do we move to fully embrace a current well
> established and extensively used standard. Unicode has perhaps shirked
> on the matter of 'case-insensitive' so there is no clean solution to
> that today. That should not prevent the switch to unicode and other
> threads such as the csv routines are now highlighting additional 'edge
> cases' where unicode needs addressing, or kicking into the long grass of
> extensions of mbstring? Maintaining 'case-insensitive' for single byte
> character sets is an option, but then one needs to stay with that for
> the whole code functionality? Allowing multibyte constant names with the
> current limited sub-set of case conversion is just not sensible, but in
> the absence of a clean unicode case folding/conversion which is the
> sensible next step?

We also need to think about how our decisions here affect how PHP is used; in
particular robustness, correctness, ... of code that people write. I believe
that one attribute of the mind of a good programmer is precision/exactness -
eschewing sloppyness. Thus if a function is written DoSomething() then it should
be spelled that way, not doSomething(), etc.

Also PHP programmers are likely to write Javascript - which is case sensitive.

I have also seen problems where someone has developed code using Microsoft SQL,
they are then asked to port it to a case sensitive database, eg MySQL**.

Or an application written on a case insensitive file system (Eg MS Windows) and
then try to deploy it on Linux: only to have includes & fopens fail because they
have been inconsistent in how they wrote file names.  [[ I do not want to get
into a discussion about the rights/wrongs of case (in)sensitive file names - we
must just accept that as part of the world that we live in.  ]]

So encouraging the ''names are case sensitive'' meme is, IMHO, good.

Then look at the internals of the PHP engine.  Case insensitively adds
complexity (== places for bugs to lurk) and makes it slower - name lookup
happens a lot, it is not just a once off (& off line) compilation process.  Some
of us work hard to make the PHP engine 0.5% faster - so why make it slower with
something that we can easily avoid ?

Yes: case insensitivity is nice, I have that option set in my program editor
search; but I am a programmer; to use PHP I have to put in a lot of effort to
learn how to do things -- the same is true for any programming language. We are
not talking about real end users such as my mother $$ - people who we try to
make our systems usable for without having to train them.

You ask what to do ?

I suggest that case insensitiveness in single byte character sets (constant &
function names) should be depricated, but enabled for one major release with an
init flag -- just as was done for register_globals.  That would give everyone a
couple of years to tidy their code up.

Then kill case insensitve anything in PHP [[ other than the likes of
strcasecmp() ]].

**OK: MySQL has a switch to make table names, etc, case insensitive - but
enabling that means a lot of testing to ensure that nothing else breaks.

$$ I don't want to be rude about her, so maybe I ought to use a different group
of clueless people, politicians perhaps ? :-)

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
http://www.phcomp.co.uk/contact.php
#include 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-24 Thread Lester Caine
On 24/09/17 11:05, Alain Williams wrote:
>> we began to read and write. I have been working in the computer
>> industry since the early 1970s on a variety of mainframe, mini- and
>> micro-computers, and a variety of languages. and this was all case
>> insensitive. It was only the invention of unix which threw a spanner
>> in the works.
> I remember those early days; things have changed. Back then case was not an 
> issue:
> 
> * ASR33 Teletypes were upper case only
> 
> * Punch cards machines were upper case only
> 
> Yes: you could sometimes get lower case, but it was hard.
> 
> Case conversion was easy:
> 
> * ASCII - 7 bit characters, easy
> 
> * EBCDIC - 8 bit characters, easy
> 
> (OK: national variants of ASCII/EBCDIC, but still 7/8 bit).
> 
> Some machines, eg CDC, had 6 bit character set - upper case only.
> 
> These days we use Unicode, a 21 bit character set. Case conversion is hard 
> and,
> as others have explained, can be ambiguous, non-reversible, ...

That sums it up nicely Alain ...
Now the question is actually ... do we stay in the dark ages of single
byte character sets or do we move to fully embrace a current well
established and extensively used standard. Unicode has perhaps shirked
on the matter of 'case-insensitive' so there is no clean solution to
that today. That should not prevent the switch to unicode and other
threads such as the csv routines are now highlighting additional 'edge
cases' where unicode needs addressing, or kicking into the long grass of
extensions of mbstring? Maintaining 'case-insensitive' for single byte
character sets is an option, but then one needs to stay with that for
the whole code functionality? Allowing multibyte constant names with the
current limited sub-set of case conversion is just not sensible, but in
the absence of a clean unicode case folding/conversion which is the
sensible next step?

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-24 Thread li...@rhsoft.net



Am 24.09.2017 um 11:36 schrieb Tony Marston:

wrote in message news:caba6370-7531-7c51-3900-434611d00...@rhsoft.net...

Am 22.09.2017 um 10:21 schrieb Tony Marston:

wrote in message news:064eafcb-e42f-cfeb-76f1-e2c5aec0e...@rhsoft.net...

Am 19.09.2017 um 11:24 schrieb Tony Marston:
If the single character  "ß" represents two "s" characters joined 
together, then the uppercase equivalent should also be a single 
character which looks like two "S" characters joined together. If 
it is not possible to write code which deals with these 
exceptions, then one alternative would be to remove these exceptions


remove from where?
from the reality?


If the lowercase character "ß" causes so many problems because it 
has no proper equivalent in uppercase then it should be removed 
from the list of valid characters. Either that or provide a single 
uppercase character - which is what that wikipedia article you 
quoted says actually happened this year


jesus christ the german language DID NOT have a uppercase ß in the 
real world until recently but had the lowercase ß virtually forever


how do you imagine "removeed from the list of valid characters" in 
that case - frankly that paragraph above shows clearly that you 
should stop to argue about this topic at all


Just because my opinion differs from yours does not give you the 
right to demand that I stop expressing it


surely, in my opinion you don't understand the topic you are talking 
about and repeating the same questionable stuff again and again and as 
you are allowed to express your opinion i am allowed to express mine


the way you argued about how code consistency don't matter says it all


It is your definition of "consistency" that I object to. Consistency 
with what? Code that abandons case insensitivity "just to be consistent" 
is consistently bad because it removes the feature called "case 
insensitivity" that we humans have become used to since we began to read 
and write. I have been working in the computer industry since the early 
1970s on a variety of mainframe, mini- and micro-computers, and a 
variety of languages. and this was all case insensitive. It was only the 
invention of unix which threw a spanner in the works.


as you call everybody which demands that code all over a poject or 
company has to follow a common coding style "OCD sufferers" - but hey, 
the others are all ghost drivers and should turn around


If you wish to enforce case sensitivity in projects which you control 
then go ahead. Just don't try to enforce it on everybody else.


that thread was about the PHP core and NOT case-sensitive where you 
called people "OCD sufferers" - so don't play stupid games here when 
everybody can access the list archive or is knowing your attitude 
anyways - you have lost that game


https://www.mail-archive.com/internals@lists.php.net/msg91537.html
https://www.mail-archive.com/internals@lists.php.net/msg91562.html

and frankly people like you arguing about code consistency are fired 
here from one the to the next because theri inability to write well 
cocumentend and readable quality code at all and they are instead coding 
timebombs


it's one thing when you write your private crap but from the point you 
want your code used by somebody else you have to play with that rules



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-24 Thread Alain Williams
On Sun, Sep 24, 2017 at 10:36:02AM +0100, Tony Marston wrote:

> we began to read and write. I have been working in the computer
> industry since the early 1970s on a variety of mainframe, mini- and
> micro-computers, and a variety of languages. and this was all case
> insensitive. It was only the invention of unix which threw a spanner
> in the works.

I remember those early days; things have changed. Back then case was not an 
issue:

* ASR33 Teletypes were upper case only

* Punch cards machines were upper case only

Yes: you could sometimes get lower case, but it was hard.

Case conversion was easy:

* ASCII - 7 bit characters, easy

* EBCDIC - 8 bit characters, easy

(OK: national variants of ASCII/EBCDIC, but still 7/8 bit).

Some machines, eg CDC, had 6 bit character set - upper case only.

These days we use Unicode, a 21 bit character set. Case conversion is hard and,
as others have explained, can be ambiguous, non-reversible, ...

> If you wish to enforce case sensitivity in projects which you
> control then go ahead. Just don't try to enforce it on everybody
> else.

May I suggest that you create your own fork of PHP and leave the rest of us 
alone.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
http://www.phcomp.co.uk/contact.php
#include 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-24 Thread Tony Marston

wrote in message news:caba6370-7531-7c51-3900-434611d00...@rhsoft.net...




Am 22.09.2017 um 10:21 schrieb Tony Marston:

wrote in message news:064eafcb-e42f-cfeb-76f1-e2c5aec0e...@rhsoft.net...

Am 19.09.2017 um 11:24 schrieb Tony Marston:
If the single character  "ß" represents two "s" characters joined 
together, then the uppercase equivalent should also be a single 
character which looks like two "S" characters joined together. If it 
is not possible to write code which deals with these exceptions, then 
one alternative would be to remove these exceptions


remove from where?
from the reality?


If the lowercase character "ß" causes so many problems because it has 
no proper equivalent in uppercase then it should be removed from the 
list of valid characters. Either that or provide a single uppercase 
character - which is what that wikipedia article you quoted says 
actually happened this year


jesus christ the german language DID NOT have a uppercase ß in the real 
world until recently but had the lowercase ß virtually forever


how do you imagine "removeed from the list of valid characters" in that 
case - frankly that paragraph above shows clearly that you should stop 
to argue about this topic at all


Just because my opinion differs from yours does not give you the right to 
demand that I stop expressing it


surely, in my opinion you don't understand the topic you are talking about 
and repeating the same questionable stuff again and again and as you are 
allowed to express your opinion i am allowed to express mine


the way you argued about how code consistency don't matter says it all


It is your definition of "consistency" that I object to. Consistency with 
what? Code that abandons case insensitivity "just to be consistent" is 
consistently bad because it removes the feature called "case insensitivity" 
that we humans have become used to since we began to read and write. I have 
been working in the computer industry since the early 1970s on a variety of 
mainframe, mini- and micro-computers, and a variety of languages. and this 
was all case insensitive. It was only the invention of unix which threw a 
spanner in the works.


as you call everybody which demands that code all over a poject or company 
has to follow a common coding style "OCD sufferers" - but hey, the others 
are all ghost drivers and should turn around


If you wish to enforce case sensitivity in projects which you control then 
go ahead. Just don't try to enforce it on everybody else.


--
Tony Marston


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php