D arithmetic problem
Walter Bright
newshound1 at digitalmars.com
Wed Jun 3 01:48:15 PDT 2009
davidl wrote:
> I highly whether the code by utilizing this kind of semantic can be
> called well-written.
It's not about whether it is well-written or not. It is about whether it
works correctly in D if it is legal C, or if it silently produces
different answers. I believe the latter is unacceptable. It should
either work the same, or issue an error.
> Porting such code to D doesn't make D any better,
> also it requires a lot of effort to port.
Not sure what you mean here, as the current rules make it easy to port C
expressions to D, because the rules are the same for C and D.
> I don't know any famous C to D
> or C++ to D converter. Instead, I have a working C# to D portting tool
> which can port some specific code by hacking on top of SharpDevelop in
> only few weeks effort. Porting C# code to D might be more attractive.
I have ported C code to D - see std.md5. I frankly have no idea how it
works, but I was able to port it despite it doing some inscrutable
integer arithmetic.
More information about the Digitalmars-d
mailing list