[Info-vax] VAX Macro to C conversion

Dave Froble davef at tsoft-inc.com
Wed Jul 10 11:40:53 EDT 2019


On 7/10/2019 9:34 AM, Bill Gunshannon wrote:
> 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.

Ok, let's stipulate that a programmer must know a bit about what he/she 
is attempting, and be done with such replies, Ok?

> 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?  :-)

Damn right.  If I want a variable initialized, I do so.  And if it 
should be a constant, I declare that.

> 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.

Strings are vital in some applications.  Perhaps not in number 
crunching.  Try a name and address without strings.  Maybe you'll be 
cleaver enough to use GPS coordinates for the address, but for the name?

Try writing a compiler without strings.

>> * 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.

Of course a programmer must be competent, but, why not make things easier?

>> 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
>
>


-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list