Date: Wed, 21 Aug 2019 16:53:47 +0300
On Wed, 21 Aug 2019 at 16:43, Timur Doumler <cpp_at_[hidden]> wrote:
>
> Yes, sure, I didn't mean that the concept of magic library functions in itself was insane. There are quite a few functions in std:: that are magic and have to be magic and that's fine.
>
> What I find insane is that magic is required for something as basic and simple as looking at the bytes that make up the value of an object.
Indeed; we need to fix this problem, because otherwise we are leaving
room for a lower-level language (you could presumably maybe sorta
kinda
implement an object representation dumper in a C library), and that's
against the fundamental goals of C++. Writing to a representation
is a completely different beast, as is relying on the values of
padding bits, but just dumping the representation bits should bloody
well
be well-formed.
>
> Yes, sure, I didn't mean that the concept of magic library functions in itself was insane. There are quite a few functions in std:: that are magic and have to be magic and that's fine.
>
> What I find insane is that magic is required for something as basic and simple as looking at the bytes that make up the value of an object.
Indeed; we need to fix this problem, because otherwise we are leaving
room for a lower-level language (you could presumably maybe sorta
kinda
implement an object representation dumper in a C library), and that's
against the fundamental goals of C++. Writing to a representation
is a completely different beast, as is relying on the values of
padding bits, but just dumping the representation bits should bloody
well
be well-formed.
Received on 2019-08-21 08:56:01