Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: swiss army knife
Joe Marshall <jrm@ccs.neu.edu> writes:

> Matthias Blume <find@my.address.elsewhere> writes:
> 
>
> We *must* be talking about different things.
>
> My point is that the policy exists for the benefit of those who run in
> *sensitive* mode.  I think I can demonstrate this.  Consider these
> alternative policies:
>
>    1.  All exported identifiers provided by the system will be in ALL
>        UPPERCASE.
>
>    2.  All exported identifiers provided by the system will be in
>        StudlyCaps.
>
>    3.  All exported identifiers provided by the system will use the
>        same convention, but you are not told what that convention is.
>
>    4.  There is no coherent policy:  any identifier exported by the
>        system could be in all lowercase, ALL UPPERCASE, Capitalized,
>        Studly, or whatever.
>
> If I write my code with case-insensitive assumptions, that is, if I
> expect `define', `DEFINE', `Define', etc. to all refer to the same
> identifier, I can expect my code to work under any of the above
> policies.  That includes the `no policy' situation.

This is wrong.  You CANNOT write your code with case-insensitive
assumptions if there is no policy, because without a policy it might
be that there are different definitions for 'define' and 'DEFINE', and
one would need another mechanism of deciding which one you get when
you write 'define' in case-insensitive mode -- at the same time
implying that there is no way of getting the other at all.

> If I write my code with case-sensitive assumptions, that is, if I
> expect `define', `DEFINE', `Define', etc. to each refer to a
> *different* identifier, then I *must* have knowledge of the case of
> the exported identifiers in order to use them.

Of course.

> If I do not know the
> policy, as in option 3 above, then I cannot determine if I need to
> write (define x 3) or (DEFINE x 3) or (Define x 3).  This occurs *even
> if* no one uses the case-insensitive mode.  This occurs even if there
> *is* no case-insensitive mode.

This is not my point.  Of course, in any mode you need to know the
spelling of the identifier you are referring to.  In sensitive mode,
spelling includes case.  That's not a matter of policy.

> The people running in case-insensitive mode do not need to know the
> policy.  They do not need to know *if* there is a policy.  They do not
> need to know if the policy changes.

Indeed, the people running in case-insensitive mode do not need to
/know/ the policy.  But they crucially depend on there /being/ some
policy in place which forbids the coexistence of identifiers that
differ in case only.

>
> The people running in case-sensitive mode *must* be aware of the
> policy if they want their code to work.  If the policy changes, they
> must change their code.  If there is no policy, they must be provided
> with an unambiguous explicit enumeration of the cases of every
> exported identifier.
>
> How can you therefore say that the policy is for the benefit of the
> case-insensitive people?

It is for the benefit of the case-insensitive people, who can remain
oblivious of the actual policy.  It is at the burden of case-sensitive
people, who have to adhere to the policy, without any benefit to them
whatsoever.

Matthias

Report this thread to moderator Post Follow-up to this message
Old Post
Matthias Blume
05-04-05 09:00 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Scheme archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:30 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.