473,769 Members | 6,538 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 6579
Jerry Stuckle wrote:

I agree with you. Deprecated elements should be removed eventually.
Not necessarily the next release, but they shouldn't be kept around
forever, either.

And if Default User needs the function that badly, he can always
recreate it.

This merely demonstrates that you didn't follow what I said. Likely
that's my fault. My point was that the removal of deprecated elements
in any programming language has to be weighed against the overall
effect of both retention and removal.


Brian
Dec 21 '05 #31
to**@marston-home.demon.co.u k wrote:

My point is that for 30 years I have worked with tools which were
totally insensitive to case, but some morons seem to think that case
is important.
I guess C, C++, and UNIX are not particularly popular.
For God's sake WHY! What problem existed in the
case-insensitive world that needed to be fixed?


Ask Dennis Ritchie.
Brian

Dec 21 '05 #32
Wayne wrote:
On 21 Dec 2005 01:03:48 -0800, to**@marston-home.demon.co.u k wrote:

Inconsisten cy is not a "real" problem as it does not cause the program
to produce wrong results.

Correct. But I would argue that programs are meant to be read by
humans at least as much as by the computer. Humans see a variable
called $foo and $foO to be different.

Er ... no. Only if they have been exposed to case-sensitive languages or
systems.

In my view, case sensitivity was one of the biggest mistakes the Unixers
made in the first place.

However, it is now pretty common, though not universal.

Oddly, having argued this, I'm going to say something in favour of PHP5.
I'm not aware of all the ramifications (I haven't done a great deal of
PHP5 yet), but it always stuck in my craw having to say (in PHP 4):

class MyName ....

if (get_class($thi ng) == 'myname') ...
Now I've no objection to being *able* to do that, but being forced to
(because get_class($thin g) will *never* equal 'MyName', which is what I
called the class) is wrong. So in this instance anyway, I prefer PHP5's
approach.

Colin
Dec 21 '05 #33
Oli Filth wrote:
I agree, it's a widespread success, but its also a big sprawling heap of
hacks, afterthoughts, inconsistent function names and parameter lists,
function aliases, issues with references that no-one really knows how to
deal with, version incompatibiliti es, nonsense like magic quotes, ...
That's what I was hinting at.
Aesthetics. Aesthetics. Perhaps one of these days you will come to grip
with the nature of this world. The ugly win because they do what it
takes to win, while the beautiful disappear into oblivion. Just look at
how Windows has prosper while the BeOS is in the technology wastebin.

Incidently, I say the same thing to my historian friend, who, despite
all empirical evidence to the contrary, thinks that the principled
politician would always carry the day.
I wasn't referring to "critics" in the sense of academics, but to
real-world programmers who might have wanted to use PHP if it weren't
such a mess (compared to other languages).
Let them use whatever language they were using then. What's this crazy
obsession with needing to "convert" people?! PHP is not a religion--it
is a tool. It is useful to me and thousands of other developers. If you
don't want to use it, well, it's your loss. From an engineer's point of
view you wouldn't alter a product to suit the desires of people who
aren't even using it--because it's goddamn stupid. Only idle academics
live for this kind of vainglory.
Bad coding *can* get you closer to a working (in one sense of the word)
program - I've seen countless posts in PHP newsgroups where newbies have
asked things like "How can I loop through my variables $thing1,
$thing2...?"
That's just igorance. We all know that using an array in this
particular situation is easier. And once someone learn an easy way to
do something, he/she wouldn't go back.
to which the answer is "use arrays instead", to which
their response is "well, my variables do the job, so why should I?".
Very good question to ask in fact. If all you can offer is a
non-technical value-judgement: "it's good practice," then you're a sort
of priest of programming, not a software engineer.
How about C or C++? They're immensely successful, far more widely used
than PHP, and comparatively they're set in stone - you don't get Bjarne
Stroustrup (chief mind behind C++) going "oh, I think we'll change the
semantics of pointers and references" every 5 minutes. Yes, these
languages get new features added from time to time, but because they
were planned so well in the first place, they very rarely lead to
backwards incompatibility .


The changes in PHP 5 were driven from above, without regards to the
needs of the user community. That gets us back to the original topic of
backward compatibility. Do you really think longtime PHP programmers
want their existing code to break? You yourself said that these changes
are made to please people are not programming in PHP. Now what benefits
do I get if Bob Bobinski the Java guru is converted to PHP? Does it
make my job easier? My programs run faster? Are my sites more secured?

Dec 22 '05 #34
t...@marston-home.demon.co.u k wrote:
My point is that for 30 years I have worked with tools which were
totally insensitive to case, but some morons seem to think that case
is important.
I guess C, C++, and UNIX are not particularly popular.
They may be popular in some circles, but I have never travelled in
those circles.
For God's sake WHY! What problem existed in the
case-insensitive world that needed to be fixed?

Ask Dennis Ritchie.


No, I'm asking you. What problem existed in the case-insensitive world
that could ONLY be solved by introducing case-sensitivity?

Dec 22 '05 #35
On 21 Dec 2005 01:03:48 -0800, t...@marston-home.demon.co.u k wrote:
Inconsistency is not a "real" problem as it does not cause the program
to produce wrong results.
Correct. But I would argue that programs are meant to be read by
humans at least as much as by the computer. Humans see a variable
called $foo and $foO to be different.


I disagree. I have worked for decades with case-insensitive languages
and I have always treated $FOO and $foo as the same variable. It does
not matter to me whether it is written all upper case or all lower
case, it is exactly the same thing. I have worked with different teams
who had had entirely different standards - some like all upper case,
some like all lower case, all for different reasons. What I object to
is being told that I MUST use one case or the other just to be
*consistent* with everyone else, especially when I disagree with their
reason for choosing one case over the other in the first place. The
language has no difficulty in recognising a word regardless of its
case, and neither do I.

By introducing case-sensitivity you are suddenly saying that $FOO and
$foo are now different, which goes against the grain of everything that
I have been taught since my first day at school way back in the last
century.

The person who dreamed up case-sensitivity is a sadist and a moron who
should be publicly flogged. But that's just my opinion.

Dec 22 '05 #36
> There is no legitimate reason to have variables named $foo, $foO,
$FOO all refering to the same thing.

I will however concede that there is also no reason that $foo, $foO,
and $FOO should point to different things either! Which is your main
objection and I agree.


Your second statement contradicts the first, but at last you agree that
having $FOO and $foo point to different things is not a good thing. If
this is as a result of introducing case-sensitivity, then
case-sensitivity must itself be "not a good thing".

Dec 22 '05 #37
>> My point is that for 30 years I have worked with tools which were
totally insensitive to case, but some morons seem to think that case is
important. For God's sake WHY! What problem existed in the
case-insensitive world that needed to be fixed?
Unicode.
Explain. I write scripts with an editor that stores in unicaode without
any problem, so what exactly is the problem?
In order to determine if two strings match entirely based on case you
have to take a lot of things into consideration. It's no longer
sufficient to say A-Z maps to a-z.
You are talking about the *contents* of variables, whereas I am talking
about the *names* of variables. There is a BIG difference between the
two.
The only reason languages like Fortran are case-insensitive is because
punch cards and many early terminals only had uppercase characters.


True, but when punched cards where replaced by terminals and keyboards
which had the capability of both upper and lower case it made no
difference which case was used as they were treated exactly the same.
Thus programmers could take their original code which was all upper
case and change it if they wanted to. Changing case was a matter of
human readability or personal taste, but the computer did not care -
the name of a function or a variable was exactly the same regardless of
which case was used.

That is what I have been used to for decades, and I see absolutely no
advantage in being forced to switch.

Dec 22 '05 #38
On 22 Dec 2005 01:35:31 -0800, to**@marston-home.demon.co.u k wrote:
On 21 Dec 2005 01:03:48 -0800, t...@marston-home.demon.co.u k wrote:
Inconsistency is not a "real" problem as it does not cause the program
to produce wrong results.
Correct. But I would argue that programs are meant to be read by
humans at least as much as by the computer. Humans see a variable
called $foo and $foO to be different.


I disagree. I have worked for decades with case-insensitive languages
and I have always treated $FOO and $foo as the same variable.


But I didn't say $FOO or $Foo. I said $foo and $foO! People have no
trouble will all caps or the first letter capitalized. What about the
difference between setsLower() and setSlower()? To a human reader
those have different meanings, to a case-insensitive compiler they are
the same.
some like all upper case,
My god. I wouldn't want my code constantly shouting at me. All upper
case is harder to read, too.
What I object tois being told that I MUST use one case or the other just to be
*consistent* with everyone else, especially when I disagree with their
reason for choosing one case over the other in the first place.
The majority of programmers disagree with you on this. Consistency
and conventions are preferred when working on a particular project or
platform -- it cuts down on errors and allows one to convey greater
meaning.
By introducing case-sensitivity you are suddenly saying that $FOO and
$foo are now different, which goes against the grain of everything that
I have been taught since my first day at school way back in the last
century.


A common Java idiom is:

Foo foo = new Foo();

The convention in Java is that class names begin with an upper-case
letter and variables begin with a lowercase variable. I can clearly
see what is happening here.

To get the same meaning if it was case-insensitive, you'd have to do
something like:

FooClass fooInstance = new FooClass()

Which makes readability worse, not better.

Dec 22 '05 #39
On 22 Dec 2005 01:40:17 -0800, to**@marston-home.demon.co.u k wrote:
There is no legitimate reason to have variables named $foo, $foO,
$FOO all refering to the same thing.

I will however concede that there is also no reason that $foo, $foO,
and $FOO should point to different things either! Which is your main
objection and I agree.


Your second statement contradicts the first, but at last you agree that
having $FOO and $foo point to different things is not a good thing.


It's not exactly a contradiction.. . I wouldn't allow both $foo and
$FOO in the same program. In a case-insentive language that's
allowed. I would want that completely disallowed.

That's a bit difficult in a free-form language like PHP but in
languages with variable declarations, the variable would have to match
the declared case otherwise it would be an error.

Dec 22 '05 #40

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
4063
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
10219
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
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
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
7413
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
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
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
2815
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.