473,795 Members | 3,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Breaking backwards compatibility - good or bad?

If you have any PHP scripts which will not work in the current releases
due to breaks in backwards compatibility then take a look at
http://www.tonymarston.net/php-mysql...verything.html and see if
you agree with my opinion or not.

Tony Marston
http://www.tonymarston.net

Dec 20 '05
150 6587
Wayne wrote:
On Sun, 1 Jan 2006 10:49:17 -0000, "Tony Marston"
<to**@NOSPAM.de mon.co.uk> wrote:

Not in C, C++, Java, etc. they aren't. And we're talking COMPUTER
languages here - not HUMAN languages. Or can't you figure out the
difference ?


But the point of this argument is that variable names such as 'box', 'Box'
and 'BOX' should all indicate the same variable, not different variables. If
you really want to have three different boxes you would use names such as
'box1', 'box2' and 'box3' to avoid any confusion.

I'd like to point again (although not necessarily for you Tony, more
for Colin) that Human programmers, in case-sensitive languages, do use
case to distinquish meaning.

In Java, classes begin with an uppercase letter and
variables/functions do not. And "box" and "Box" are commonly used
together. In C, all capitals signals constants or types and BOX and
box are commonly used together.

Humans do these sorts of things. I'm not saying it's good or bad --
I'm just saying that's how it's done.

I don't deny it. I'm not saying that humans don't or can't do these things.
Case distinction is but one of the many distinctions and pernickity
rules that we have to learn when we learn to program in a language or
system that uses it. We can of course learn it, just as we can learn
that letter 'o' must be distinguished from zero. And because it's there,
some people make use of it.
But, to reiterate and expand my previous argument, the problem comes
when we make up the letters into words - which, most of the time we do,
when we are naming things - variables, classes, files.
Those of us who grew up with English (and other European languages which
have case in their alphabets) are used to thinking of the word 'box' as
being the same word whether written 'BOX' 'box', 'Box' or even 'bOX'.
It's not that we can't distinguish these, but we don't normally need to,
and more significantly, we don't have very convenient ways of expressing
the distinction.
This means first that (as I said before) if we need to dictate a line of
code over the phone, we need in principle to express the case of every
letter. There are ways of shortening this of course, and if there is a
relevant convention (such initial cap, or camel case) we may be able to
express it relatively easily, provided the hearer knows the convention.

But actually I think there is a more severe issue, to do with
remembering and comparing names. The variable I was just using in that
other routine - was it called 'textbox', 'TextBox' or 'textBox'? For me
anyway, remembering a name made up of ordinary words or familiar
abbreviations for them is trivial (I probably vocalise it). But
remembering the case, if it is not all a single case, is not trivial -
it takes more effort and is prone to error. I can't believe that I am
the only one to have this experience.
It is true, of course, that conventions for use of case assist in this.
If I know that class names will always have an initial capital, I don't
have to remember this for each name. But I find that in practice there
are lots of different conventions and I'm often switching from one to
another as I work on different scripts written by different people at
different times, even on the same system. A particular bugbear (because
particularly difficult to remember) is when using CamelCase, are little
words in the middle of names capitalised or not? (i.e. is it WriteToFile
or WritetoFile?) Again you can, and probably should, have a convention,
but what if there are different conventions?
Somebody will probably come back and say, well you should have
conventions on this and then you won't have a problem. And I say, yes,
but if the language weren't case sensitive in the first place, there
wouldn't be a problem.

Despite Jerry's insistence, I have yet to see an argument in favour of
case sensitivity that doesn't come down to either 'everybody uses it' or
'for consistency with XXX system that uses it'. I recognise that as a
practical fact it is here to stay, and yes, I use it. But that doesn't
stop me from arguing its demerits, and I resent being patronised and
insulted for doing so (by Jerry, rather than by you Wayne).

Colin
Jan 4 '06 #141
Message-ID: <dp************ *******@news.de mon.co.uk> from Colin Fine
contained the following:
Despite Jerry's insistence, I have yet to see an argument in favour of
case sensitivity that doesn't come down to either 'everybody uses it' or
'for consistency with XXX system that uses it'.


I haven't either.

Making PHP optionally case insensitive via an ini setting wouldn't
affect any existing scripts.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jan 4 '06 #142
Geoff Berrow wrote:
Message-ID: <dp************ *******@news.de mon.co.uk> from Colin Fine
contained the following: <snip> Making PHP optionally case insensitive via an ini setting wouldn't
affect any existing scripts.


Yup, that's great. I'll be much happy to see case sensitivity for
functions/methods. Now, it's much irritating when others break (our)
camelCasing method naming conventions--that is, if we have dbOpen
method, they break it by calling it as $foo->DBOPEN--such distinctions
make the method looks alien at first glance and the 3rd programmer
finds difficult.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jan 4 '06 #143
In article <11************ **********@g47g 2000cwa.googleg roups.com>,
"R. Rajesh Jeba Anbiah" <ng**********@r ediffmail.com> wrote:
Geoff Berrow wrote:
Message-ID: <dp************ *******@news.de mon.co.uk> from Colin Fine
contained the following: <snip>
Making PHP optionally case insensitive via an ini setting wouldn't
affect any existing scripts.


Yup, that's great. I'll be much happy to see case sensitivity for
functions/methods. Now, it's much irritating when others break (our)
camelCasing method naming conventions--that is, if we have dbOpen
method, they break it by calling it as $foo->DBOPEN--such distinctions
make the method looks alien at first glance and the 3rd programmer
finds difficult.

--
<?php echo 'Just another PHP saint'; ?>

<?="Just another PHP saint" ?>

:)
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/



--
Sandman[.net]

"As far as my decision to use the PC goes, that
went according to my pocketbook"
- Edwin, too poor to afford a Mac.
Jan 4 '06 #144
Sandman wrote:
In article <11************ **********@g47g 2000cwa.googleg roups.com>,
"R. Rajesh Jeba Anbiah" <ng**********@r ediffmail.com> wrote:

<snip>
--
<?php echo 'Just another PHP saint'; ?>

<?="Just another PHP saint" ?>

:)


Hmm... The first commandment is "Don't use short tags and double
quotes":-)

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jan 4 '06 #145
On Wed, 04 Jan 2006 07:17:35 +0000, Geoff Berrow
<bl******@ckdog .co.uk> wrote:
Message-ID: <dp************ *******@news.de mon.co.uk> from Colin Fine
contained the following:
Despite Jerry's insistence, I have yet to see an argument in favour of
case sensitivity that doesn't come down to either 'everybody uses it' or
'for consistency with XXX system that uses it'.


I haven't either.

Making PHP optionally case insensitive via an ini setting wouldn't
affect any existing scripts.


Oh sweet Jesus, not another radical langauge-changing ini setting!

Jan 4 '06 #146
Message-ID: <rq************ *************** *****@4ax.com> from Wayne
contained the following:
Making PHP optionally case insensitive via an ini setting wouldn't
affect any existing scripts.


Oh sweet Jesus, not another radical langauge-changing ini setting!


There is exaggeration on both sides. I never find case sensitivity a
problem. It would be a sloppy coder who continually changed the case of
variables and I'm not pushing for it, but if enough people want it....
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jan 4 '06 #147
R. Rajesh Jeba Anbiah wrote:
Geoff Berrow wrote:
Message-ID: <dp************ *******@news.de mon.co.uk> from Colin Fine
contained the following:

<snip>
Making PHP optionally case insensitive via an ini setting wouldn't
affect any existing scripts.


Yup, that's great. I'll be much happy to see case sensitivity for
functions/methods. Now, it's much irritating when others break (our)
camelCasing method naming conventions--that is, if we have dbOpen
method, they break it by calling it as $foo->DBOPEN--such distinctions
make the method looks alien at first glance and the 3rd programmer
finds difficult.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/


What really irritates me is when women leave the toilet seat up.
Really, it's down right inconsistent to be able to piss both standing
up and sitting down into the same toilet. I'm for urinals in every home.

Jan 5 '06 #148
Chung Leong wrote:
R. Rajesh Jeba Anbiah wrote:
Geoff Berrow wrote:
<snip>
Making PHP optionally case insensitive via an ini setting wouldn't
affect any existing scripts.


Yup, that's great. I'll be much happy to see case sensitivity for
functions/methods. Now, it's much irritating when others break (our)
camelCasing method naming conventions--that is, if we have dbOpen
method, they break it by calling it as $foo->DBOPEN--such distinctions
make the method looks alien at first glance and the 3rd programmer
finds difficult.


What really irritates me is when women leave the toilet seat up.
Really, it's down right inconsistent to be able to piss both standing
up and sitting down into the same toilet. I'm for urinals in every home.


I don't get your metaphor. But, if's anything to signal to shut my
mouth, I accept:-)

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jan 5 '06 #149

"Wayne" <no*@here.com > wrote in message
news:cd******** *************** *********@4ax.c om...
On Sun, 1 Jan 2006 10:49:17 -0000, "Tony Marston"
<to**@NOSPAM.de mon.co.uk> wrote:
Not in C, C++, Java, etc. they aren't. And we're talking COMPUTER
languages here - not HUMAN languages. Or can't you figure out the
difference?


But the point of this argument is that variable names such as 'box', 'Box'
and 'BOX' should all indicate the same variable, not different variables.
If
you really want to have three different boxes you would use names such as
'box1', 'box2' and 'box3' to avoid any confusion.


I'd like to point again (although not necessarily for you Tony, more
for Colin) that Human programmers, in case-sensitive languages, do use
case to distinquish meaning.

In Java, classes begin with an uppercase letter and
variables/functions do not. And "box" and "Box" are commonly used
together. In C, all capitals signals constants or types and BOX and
box are commonly used together.

Humans do these sorts of things. I'm not saying it's good or bad --
I'm just saying that's how it's done.


Something which happens in a minority of languages should not be considered
as the standard for ALL languages. Just because *shit happens* does not make
*shit* the standard.
Jan 6 '06 #150

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1787
by: Jason Mobarak | last post by:
Greetings! Say that it's desirable to provide backwards compatibility for methods of an object, consider the case where... class Foo: def bar (self, a, b): pass ....is a defined class that can be serialized and later be deserialized.
7
2151
by: Sonny | last post by:
I need to port a library that is written entirely in C to C++. The library is supported on quite a few platforms (windows, Solaris, Linux, AIX, HP-UX, OSX, etc...) and there's quite an existing customer base that uses it. I need to maintain backwards compatibility such that existing users won't have to do anything to their existing applications other than a re-compile when they upgrade to this new version of the library. I figure that I...
70
4072
by: py | last post by:
I have function which takes an argument. My code needs that argument to be an iterable (something i can loop over)...so I dont care if its a list, tuple, etc. So I need a way to make sure that the argument is an iterable before using it. I know I could do... def foo(inputVal): if isinstance(inputVal, (list, tuple)): for val in inputVal: # do stuff
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7541
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.