|
Posted by Jerry Stuckle on 11/14/03 11:54
Tony Marston wrote:
> "Shelly" <sheldonlg.news@asap-consult.com> wrote in message
> news:7BGzg.6578$gF6.716@newsread2.news.pas.earthlink.net...
>
>>"Tony Marston" <tony@NOSPAM.demon.co.uk> wrote in message
>>news:ean53d$rlk$1$8300dec7@news.demon.co.uk...
>>
>>>Case sensitivity can lead to unmaintainable code. For example, if there
>>>is a variable called $foo I expect $Foo and $FOO to mean the same thing,
>>>not different things. The fact that they are not can lead to unexpected
>>>results.
>>
>>You just said it here right now. It can lead to unexpected results
>>....for YOU....because ...YOU...expect them to be the same when, in fact,
>>they are different thingsp
>
>
> And so does everybody else with a background in case insensitive languages.
>
You cannot speak for "everybody else with a background in case
insensitive languages" - and you certainly do not speak for me. In
fact, you don't speak for most programmers I know with that background.
And yes, I did start with case insensitive - FORTRAN II back in 1967,
and several other languages since then, including some you've probably
never heard of.
>
>>>Programmers who deliberately create different variables with the same
>>>name but different case are bad programmers, but a *proper* language
>>>(such as COBOL) removes the possibility for such bad programming by
>>>ignoring case and treating all the variables as a single variable. Any
>>>language which
>>
>>IMO COBOL is the worst language I have ever seen. I have not programmed
>>in that language for almost thirty years. At that time it treated all
>>variables as globals -- talk about you UNMAINTAINABLE code!!!!
>
>
> It is possible to write mantainable code in COBOL just as it is possibe to
> write unmaintable code in Java. It is the programer and not the language
> which is the deciding factor.
>
>
>> (I think they changed that somehow, but am not sure). If you happened to
>>use the same name in two different (were the "subroutines" called
>>paragraphs or procedures? -- I forget), then a change in one changed the
>>value in the other -- and that was not convention; it was the language
>>itself. Ugh and double-ugh!!!
>
>
> That is not the case as I remember it. Each subprogram has its own working
> storage section, so anything declared in one subprogram cannot possibly
> affect anything in another subprogram. It is only when you get to shared
> storage areas, such as common storage or the linkage section, that you may
> have problems. Yet agin, as COBOL is a compiled language, anything which is
> actually declared more than once can be flagged as an error at compile time,
> so the problem is easily spotted and fixed.
>
>
>>>deliberately allows programmers to wrte unmaintainable code is a bad
>>
>>Oh, I'll totally agree with that statement. That is why COBOL (at least
>>circa 1975) royally sucked wind.
>
>
> I agree. COBOL 85 was much, much better.
>
>
>>>language. After all, that is why most modern languages do not include
>>>GOTO because f the problems it can cause.
>>
>>Uh, in fact that is not correct. Java, C, C++ and any other I can think
>>of all allow the goto. It is just that good programmers don't use it.
>>What do we call that now? I think the word "convention" comes to mind.
>
>
> Programmer conventions are still not the same as language rules, and I
> dislike the idea of certain conventions in some languages being promoted to
> rules in other languages.
>
No, but programmer conventions are built around language rules, and take
advantage of those rules.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|