[Info-vax] C and C++ and Deprecation (was: Re: New VSI post on Youtube)
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Thu Sep 5 13:30:57 EDT 2024
On 2024-08-14 18:48:04 +0000, Arne Vajhøj said:
> On 8/14/2024 2:33 PM, Arne Vajhøj wrote:
>> And it has different size of long and pointers. Causing problems
>> for two cases:
>> * code that make implicit assumptions that those are 32 bit
>> * mixing C and C++
>
> I am getting more and more convinced that C and C++ code should
> completely switch to the explicit length model.
> ...
> Where did I put that asbestos suit to protect me from the C/C++ crowd?
>
> :-)
>
> Arne
I'd have no issues with that.
Don't forget [u]int_{fast,least}{n}_t available in C99 and later, too.
That, and add deprecation warnings for the problem calls.
One bunch has the deprecation warnings enabled by default, with
_CRT_SECURE_NO_WARNINGS to disable those checks.
Related (and eventually probably more accessible on OpenVMS x86-64) is
clang-tidy:
https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unsafe-functions.html
Semi-related to interoperating with C:
https://ziglang.org/learn/why_zig_rust_d_cpp/
Semi-related to Rdb: What is "large" to SQLite is quite possibly very
much larger than OpenVMS and its apps.
But given forty years of existing code in Rdb (and in OpenVMS),
wholesale language migrations just aren't happening ever, and any
incremental migrations, and refactoring and overhauls, are going to
happen over decades at the fastest.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list