Rick,
I'm not hating on C. It's silly to say that C hardware near. I would say less 
than 5% of the x86 or z instructions are used by the language. Look at the x86 
instruction manual or the IBM POPS. Do you think malloc is written in C? C 
gives you access assembler at a minimum, there is an assembler SVC coded in the 
C program. Only assembler is hardware near.

C is not a good language for solving complicated problems because it over 
complicates solutions. Without the macro language in assembler, it would have 
the same problems. Ask yourself, how would you implement STORAGE, DCB, OPEN or 
other macro important system macro. Would you create a struct and fill it in? 
Would you have various calls with various parameter lists. How would you 
validate that the correct combination of arguments have been coded.

    On Tuesday, July 18, 2023 at 12:30:46 PM PDT, Rick Troth <[email protected]> 
wrote:  
 
 Or maybe "limber" instead of "limbo", meaning flexible. But puns and 
analogies always break down in the end. I have come to accept that.

Started this before I left town for a few days.
It's initially knee-jerk, but seemed worth saying.

I do love HLASM, and I miss it in my current role.
What's so great about it? Well, like with any assembler, you get full 
control of the machine (within constraints: privileged mode or not, 
stuff like that).
I've known other assemblers (I mean for other architectures) and enjoyed 
them. But none were as robust. That's partly because of the assemblers 
themselves, but also because of the architectures. Z is Z.

I love C (and I don't miss it: it's everywhere).
But then, I refuse to step into "obfuscations" and other trickery that 
some C coders love to dabble in. You know, keep it simple!
What I like about C is that it gets me as close as possible to the 
machine and yet remain highly portable. You say C code is not portable? 
Au contraire! I can demonstrate that it is (or that it "can be").
Other assemblers are not as much fun as HLASM. I can avoid them when I 
use C.

Don't get me started about C++.
Some love it, but it's a different language. If you really want C++ 
maybe consider Java.

This is what tripped me up:

 > Beyond all the fighting here, just be glad the assembler macro 
language is so powerful.
 > Every time I have to do something in C that call out for a macro, I'm 
appalled at how pathetic that language is!

I've spoken with PHSiii about his post, and he was talking more about 
the C pre-processor (where I mostly concur, it's kinda sucky) than about 
C the language.
But there are plenty people who truly dislike C from all sides. I've 
become sensitive after reading a lot of C bashing (not on this list, but 
in other fora).

Critique of the language, and especially of what some call "macros", I 
willingly accept.
It's that P-word adjective that really bites. (pathetic)
Where else can I find anything as close to the hardware and yet not 
directly ISA-bound? That's anything but pathetic.

*instruction-set architecture

Indeed, HLSAM has a powerful macro feature.
By comparison, C has a "pre-processor". I use it for a handful of 
symbolic constants. Beyond that, it uglifies my code, so I avoid it.

There's no accounting for taste, but C is a very good language, 
especially for HLASM fans.
If one just doesn't like the language, that's a matter of taste. I hope 
that we all can steer clear of languages we dislike.
Seriously, if you just don't like C then I hope you never have to use 
it. But let's not engage in language flame wars.
I'd like to think that I'm somewhat broad minded: I hate Java, but not 
the language, rather the requirement for the JVM and the ecosystem which 
has grown up around it.

*Java was a language looking for a purpose, then found popularity when 
the web was young

It's possible to write ugly pathetically byzantine unmaintainable code 
in C.
It's possible to write ugly pathetically byzantine unmaintainable code 
in HLASM.

C takes a lot of flack these days, as people are (or claim to be) very 
concerned about security (while protecting the WRONG THINGS, but I 
digress).
Buffer overruns and other such things lead the charge as they look for 
"safe" languages. Something about guns and feet might fit here, or the 
Kilpatrick to Alexander spoof from the movie Airplane. (James Kilpatrick 
played by William Tregoe with Shana Alexander off-screen. You know the 
one!) "They bought their compilers. They knew what they were getting into!"

Ironic that none of these C haters (in the field, not on this list) 
throw a single dart at assembler. Why is that?

The up-and-coming "safe" language intended for "systems" is Rust.
Who thought up that name? What did they want to convey? Maybe they think 
"systems" level coding is old and weathered and ... er, uh ... rusty?
But I am trying to have Rust (compiler) in my doctor's bag-o-tricks. 
It's almost as difficult to build as LLVM and 'clang'.
Rust enjoys growing popularity because it is touted as a "systems" 
language without the risks of C (like for stepping on your own memory, 
y'all have heard the stories).
That takes me back to the reason I *like* C: it lets me do much of what 
I can do in assembler (stepping on my own memory) but somewhat portably.

Question: if Rust is "safe" will it actually let me flip bits with the 
same precision as C?

https://www.youtube.com/watch?v=uhU7Fgw5PmI


-- R; <><
  

Reply via email to