|
|
 |
RE: FN-FORUM: C#
date posted 24th October 2003 23:02
You've hit the nail on the head there I guess saying that it's
"conventional" rather than mandatory. A bit like any other "programmers
reference" / "style guide" for doing things like naming conventions,
"camel case" names etc.
The problem comes when (in the example given above and in [1]) somebody
didn't follow convention (or didn't know that there was a convention) or
that a different convention or house style was used compared to
conventional convention !
And yes, insensitive string handling takes more resources, but generally
most string handling is required to be case insensitive - at the point
when it is case sensitive then in reality it's handling bytes and will
certainly be faster.
You're probably right about the DOS / Unix case copyright thing - I must
admit I'd not thought about that.
-----Original Message-----
From: Dom [EMAIL REMOVED]
Sent: 24 October 2003 21:10
To: Andy Macnaughton-Jones
Subject: Re: FN-FORUM: C#
On Friday 24 Oct 2003 10:16 am, Andy Macnaughton-Jones wrote:
> I've never really understood why people want to have case-sensitive=20
> languages. In "written english" terms, it means that "House" is=20
> different to "house" is different to "HOUSE".
It can be very useful. It's conventional in C programming for instance
that macros are #defined in all capitals. Hence if you are looking
through some code and you see MAX(a,b) you know it's a macro and if you
see max(a,b) it's a function. [1]
Discussion of macros and functions, using the max example, here:
http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_20
731126.html
In file naming conventions, case is again useful. When installing Un*x
software one tends to look for a README or a Readme file and it's easy
to spot the capitalised filenames in a listing.
Computationally, case insensitive string handling is a waste of
resources, and a pain to implement.
ISTR reading that the main reason DOS was case-insensitive was to make
sure it didn't infringe Unix copyright - similarly with the
forward-slash / backward-slash mess that programmers have to contend
with.
IMLTHO proper growed-up computer languages are case-sensitive, case-
insensitive languages are probably BASIC derivatives, and we all know
what the B stands for, don't we?
[1] Unless you're the C programming tutor on a Music Technology course
at a certain Northern University in which case you define "max" as a
macro which of course totally buggers things up when you want to, say,
import a bit of code that has a struct with a member called "max", like
C programmers the world over have been doing since K&R first published.
Duh.
=3D=3D=3Dredmail.com - webmail with a difference!
10Mb for just GBP 9.99 a year. Launch special 1Gb for GBP 99.99 a year
IMAP, POP3, Spam Filtering and Anti Virus as standard.
Visit http://www.redmail.com/?fl-signup to join.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|