On Sat, 31 Aug 2019, 11:55 Karsten Pedersen, <kpeder...@gmx.com> wrote:

> I have yet to see it in any gtkmm code (you will be pleased to hear)
> but my personal opinion is that it is surely a nice idea to attempt
> to make C++ 100% safe rather than having to rely purely on the skills of
> a developer. This is generally the trend in Rust communities but it
> seems the culture in C++ communities is that not all safety is
> necessary.
>

With Rust that safety is checked and enforced by the language and the
compiler. The language rules mean that most checking can have no overhead
at runtime. Your solution incurs non-zero runtime cost (extra reference
counting) which can't be optimised away in general.

Being 100% safe would be nice, but there's a trade off. Achieving it in C++
is either impossible or very expensive. I don't agree that "it is surely a
nice idea to attempt to make C++ 100% safe". It's unrealistic to pretend
otherwise.
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to