Friday, January 28, 2022

Digest for comp.lang.c++@googlegroups.com - 3 updates in 1 topic

Juha Nieminen <nospam@thanks.invalid>: Jan 28 07:35AM

> public:
> explicit B(e) {};
> };
 
'explicit' is a severely underused keyword. (So much so that some C++
experts think that it should be the default, and that it would be better
if you had to explicitly use an 'implicit' keyword to make the constructor
implicit, rather than the other way round. But alas, backwards
compatiblity...)
"Öö Tiib" <ootiib@hot.ee>: Jan 28 03:27AM -0800

On Friday, 28 January 2022 at 09:35:59 UTC+2, Juha Nieminen wrote:
> if you had to explicitly use an 'implicit' keyword to make the constructor
> implicit, rather than the other way round. But alas, backwards
> compatiblity...)
 
Similar situation is with overused keyword "const", it would benefit language
to have it default and some kind of "var" or "mut" for mutable stuff.
Alas, backwards compatibility.
"Alf P. Steinbach" <alf.p.steinbach@gmail.com>: Jan 28 01:30PM +0100

On 28 Jan 2022 12:27, Öö Tiib wrote:
 
> Similar situation is with overused keyword "const", it would benefit language
> to have it default and some kind of "var" or "mut" for mutable stuff.
> Alas, backwards compatibility.
 
#define VAR auto
#define LET const auto
 
- Alf
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: