[Info-vax] VAX Macro to C conversion
Bill Gunshannon
bill.gunshannon at gmail.com
Wed Jul 10 09:34:01 EDT 2019
On 7/9/19 10:37 PM, Arne Vajhøj wrote:
> On 7/9/2019 8:20 PM, Bill Gunshannon wrote:
>> On 7/9/19 9:04 AM, Dave Froble wrote:
>>> One might also argue that C is rather prone to errors.
>>
>> C is not prone to any more errors than any other language. See
>> previous statement.
>
> Languages are not equal when it comes to prevent errors.
>
> And C is probably one of the worst in this regard among widely
> used languages.
>
> Characteristics like:
> * no check on array indexes
Programmer should know that going in.
By the way, same applies to COBOL.
> * very flexible pointer arithmetic
Programmer should know that going in.
What's wrong with that? All assemblers have pointer arithmetic.
> * very flexible type casting
Programmer should know that going in.
What's wrong with that? A very useful function. And easily done
in every assembler I have ever used.
> * allowing use of uninitialized variables
Programmer should know that going in. You mean like someone
here's beloved BASIC? :-)
So does Fortran.
> * no string type
So what? What's so great about a string type? Fortran
didn't have it until 77. Pascal didn't have it until UCSD.
> * non type safe enum
> * lots of old and bad design in standard RTL
> * lots of undefined and implementation specific behavior
Even Ada has that.
> makes it much easier to write code that result in bad runtime
> error than most other common languages of today.
Do I really need to go on? Stop blaming a language for the
incompetence of the programmer.
>
> Some of these characteristics may be very useful in certain
> contexts. But that does not make them less likely to
> result in errors.
If you ever worked with students you would have seen a lot of
errors in every language. As they become more qualified the
errors decrease. Yes, even in C.
bill
More information about the Info-vax
mailing list