Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2024 00:15:41 +0200
From:      Steffen Nurpmeso <steffen@sdaoden.eu>
To:        Dmitry Salychev <dsl@FreeBSD.org>
Cc:        Jan Knepper <jan@digitaldaemon.com>, David Chisnall <theraven@FreeBSD.org>, Poul-Henning Kamp <phk@phk.freebsd.dk>, ske-89@pkmab.se, freebsd-hackers@freebsd.org
Subject:   Re: The Case for Rust (in any system)
Message-ID:  <20240909221541.pjyw_h6H@steffen%sdaoden.eu>
In-Reply-To: <868qw0uafp.fsf@peasant.bootbsd.com>
References:  <202409091304.aa20239@berenice.pkmab.se> <202409091124.489BOWk2082765@critter.freebsd.dk> <B8AEE93C-6431-4ED2-B1C6-7945A9A41AD0@FreeBSD.org> <202409091332.489DWNmO084207@critter.freebsd.dk> <C992AC0F-6EA4-4B67-BC0C-702209039586@FreeBSD.org> <256401bf-1b46-467a-a44e-42fc14d20ebf@digitaldaemon.com> <868qw0uafp.fsf@peasant.bootbsd.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Dmitry Salychev wrote in
 <868qw0uafp.fsf@peasant.bootbsd.com>:
 ...
 |I've mentioned MISRA C++:2023 already, but would like to elaborate on my
 |idea behind it. It forms a subset of ISO/IEC 14882:2017 (C++17) by
 ...
 |For example, there's a rule 13.1.1 which prohibits classes to be
 |inherited virtually, but it's in the "advisory" category at the same
 |time. Rule 13.3.1 states that user-declared member functions shall use
 |the virtual, override and final specifiers appropriately.
  ...

..only to mention that somehow the order of the C++ keywords
virtual and override are bogus unless (last and only version
i truly ready aka bought the book was '98) i have been hitten by
a compiler bug.  I used to use preprocessor macro things for
clarity aka "explicity", but when newer standards came the order
was reversed, i know have (horrors!) use wrapper macros to be able
to place the keyword correctly, that is

either
  include/su/code.h:#  define su_OVRX(X) virtual X
or
  include/su/code.h:#  define su_OVRX(X) X override

and thus

  src/su/.main.cxx:       OVRX(~a_md__sade(void)) {}
or
  src/su/.main.cxx:       OVRX(up property(prop prop) const){

instead of, as before the advent of override

  ovrx ~a_md__sade(void){}
or
  ovrx up property(prop prop) const){..}

*What a mess*!!  I mean *is* override an override of virtual, then
why is it placed that [fecal].  That is just [fecal].  If they
really abolish the preprocessor at some later point, all bets are
off.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240909221541.pjyw_h6H>