> This is something where C and C++ developers learn very different
> philosophies that they have each put a lot of effort into. In C++,
> casting between pointer types is considered quite dangerous if the
> compiler doesn't check for human error. This is a basic concept
> learned early on and adhe
On Sat, Sep 10, 2022 at 2:14 PM samuel ammonius wrote:
>
> > First, your own example of not having compile-time checking of the means
> > that
> > those programmers are accepting less security for the sake of staying in the
> > same language.
>
> How? It's just the equivalent of static_cast(), an
> First, your own example of not having compile-time checking of the means
that
> those programmers are accepting less security for the sake of staying in
the
> same language.
How? It's just the equivalent of static_cast(), and I'm talking about types
with
the same sizes. If the types were of diff
On Saturday, 10 September 2022 10:02:05 PDT samuel ammonius wrote:
> These may not seem like huge issues, but the fact
> that the
> language has no problem with anything that the actual computer doesn't have
> a
> problem with is something very valuable for most C developers, so they
> probably
> w
> Allan’s proposal to keep the code C but ensure it builds with a C++
> compiler likely had precisely this kind of scenario in mind. It does
> help others to make a generic interface. It is likely a lot more work.
> Experience with an AI-assisted IDE could speed things.
> And what's the gain here?
On Saturday, 10 September 2022 07:05:46 PDT Karl Semich wrote:
> Qt has such a strong C++ basis that I personally might take the small
> performance hit of keeping C bindings more separate, to make merging
> forward easier.
What performance hit? You have to wrap ALL functions and none of them can
> its apps and users. Many of these programs are built on top of years of C
> code,
> so I don't think it would be easy for the developers of those programs to
> switch
> from C to C++ even if they wanted to.
Allan’s proposal to keep the code C but ensure it builds with a C++
compiler likely had p
> In C, constructors/destructors usually become alloc/free functions. C
> has macros and code generation but these aren’t directly analogous to
> templates.
The problem is that C++ doesn't let you get the address of
constructors/destructors.
The only option might be to make a function that calls "