Why does intpromote spew warnings for ~ operator?
Alexey
invalid at email.address
Tue Sep 14 07:01:02 UTC 2021
On Tuesday, 14 September 2021 at 06:03:24 UTC, bauss wrote:
> On Monday, 13 September 2021 at 22:27:11 UTC, Alexey wrote:
>> On Monday, 13 September 2021 at 21:03:41 UTC, Guillaume Piolat
>> wrote:
>>> On Sunday, 12 September 2021 at 14:14:03 UTC, Steven
>>> Schveighoffer wrote:
>>
>> It's also not exactly clear why:
> 1. It's fairly clear why. Because a lot of the D ecosystem
> depends on C such as libraries etc.
The ability of D to parse C code, doesn't mean it necessarily
should use same rules in it's own D code.
>a lot of C code is/will be
> ported to D
mythical possibility
> and it's impossible to do so if there are unclear/major
> behavior differences.
how is it unclear? - because C coders doesn't want to learn D? -
this is the reason D should be like C?
there's also many other languages, which can (to some distinct)
understand C/C++ (like Go, Rust, Java, Python and so on). But
they are not necessarily gain same promotion rules (and they
shouldn't, because those are separate languages)
> D promotes itself with "betterC" which means it needs to behave
> like C to be a better C.
to my understanding, betterC - is an option. if user selects this
option, maybe then D should work like C. but many people also
going to D because it isn't C/C++ - how about them, them who
doesn't like C/C++?
> 2. It's not necessarily copy-pasting but when you port code you
> don't go through it line-for-line and verify because that will
> take a very long time.
In any case, such port will require also types transition and
many more things. In any case such a porter will should recheck
code
> There are even tools for D that allows porting C to D code
this just says what such tools could rewrite code to D's
conformations
> and when using those tools you will not be able to verify the
> code that easy.
why is this?
> Since a lot of the ecosystem depends on those tools then the
> behavior should be consistent with C.
what you just said, is "D depends on C, because D should depend
on C"
> 3. Yes, see the first point about the ecosystem heavily relying
> on C.
----
all this doesn't answer why D should be like C. or is it like:
* C++ is C with classes
* D is C++ with GC
, yes?
so if C++ will gain GC - D will become unneeded?
also, as somebody apparently mentioned earlier, such a radical
change in behavior, will probably require a major version number
change. - will D become the second Python with version 2 and 3
support for next 10 years and consequent BDFL expel?
I will conclude with following: I heard what D developers stated
one day what D will accept C code; but I don't think this is
necessary and I will not judge D developers for not achieving
this. Not to say C already has it primary successors (Limbo and
Go (which for some reason decided not to look like C)).
More information about the Digitalmars-d
mailing list