C++ is technically not quite a proper superset of C. For example, C allows 
implicit int declarations and C++ does not. But admittedly, a quibble. C++ is 
for all practical purposes a superset of C. 

I have inside information on C# that it is probably okay if not legal to share.

C# started life inside MS as Visual Java. Sun's lawyers told MS no, you either 
Java our way or not at all. So MS re-wrote Visual Java into C#. C# is very 
Java-like and by extension C++-like, but without any non-OO possibilities at 
all. Programs don't start with a call to a static main(), they start with the 
instantiation of a program object. For a mainframe HLASM programmer, C# is a 
bigger leap than C -- but IMHO, a better leap, particularly if the ultimate 
goal is taking advantage of the tremendous benefits of OOP, on the mainframe.

Also, while I am cluttering up the thread anyway, let me address a question of 
@John's that I missed: what kind of programs did/do I write in C++? Answer, 
they all run as "conventional" z/OS programs, either as jobs or started tasks. 
Externally you would be hard-pressed to distinguish them from "classic" MVS 
programs written in HLASM.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Steve Smith
Sent: Friday, January 12, 2018 10:59 AM
To: [email protected]
Subject: Re: curious: Popularity & use of C on z/OS.

Yeah, what Charles Mills said :-).  He's a lot less lazy than me when it comes 
to writing stuff out.

C++ *is* a superset of C, and it does provide several useful
enhancements (e.g. new/delete vs. malloc/free), but that's not what it was 
invented for.  It was invented to allow object-oriented programming, and that 
is a whole new paradigm (game-changer as it were).  And I agree that it is a 
great thing (and fun) to learn and do.  But prepare for considerable mental 
effort to get there.  btw, it seems to me that C++ has been extended much 
further since I did much work with it.  Probably it's like C++++ now.

I don't know much about C# (call it "see pound" to impress people*), but Java 
was invented (purportedly anyway) as a safer C++, and likewise, basically 
forces object-oriented programming.  I get the feeling that C# was just 
microsoft's attempt to keep Java (Sun) from taking over too much mind-share.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to