On 23/04/2018 9:23 PM, Jerry Callen wrote:
C and C++ do NOT have garbage collection; memory management is controlled by 
the programmer, with C++ providing a lot of assistance in the form of 
constructors and destructors.

String manipulation can be done in a variety of ways; C++, in particular, 
provides counted strings and byte arrays with no restrictions on content.

FWIW, while we impoverished souls on z/OS still use std::string with a COW implementation the C++11 standard forbids it. It turns out in multi-threaded applications the locking overhead was higher than copying [1]. I'm doing a lot of Java work right now and I can see the merits of the immutable Java string class with all the nice benefits like interning.

[1] https://shaharmike.com/cpp/std-string/


I've programmed in assembler, PL/I, COBOL and C/C++. If you are dealing with 
COBOL records that make extensive use of OCCURS DEPENDING ON, it probably make 
sense to stick with COBOL. Otherwise, it's quite easy to write robust, 
efficient code in C and C++ on z/OS.

Indeed. IMO, the more strongly typed the language the more robust it is. Assembler, COBOL, C et al don't fit into that category.

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

Reply via email to