Walter Bright wrote:
Jeremie Pelletier wrote:
Those new and better ways of doing things in programming languages
might imply semantics some programmers are not willing to use, and
would rather keep their older language and implement their own version
of that feature themselves, pure C will always dominate in that in my
opinion since I can't think of anything in the language itself that
generate calls to runtime methods,
There are several things that do - things like floating point
conversions, long division, etc.
Aren't those just part of the generated machine code? I mean the
compiler does not add calls to symbols which need to be resolved in the
runtime library.
which fortunately can also be done in D. A lot of D features require
runtime calls, not everyone is willing to dig into the runtime to
learn what such calls imply in terms of performance. For example, I
myself stay off scope() for real time code because I'm aware it needs
to call into _d_framehandler.
That's only called when handling an exception, not for just setting up
the frame and normally executing it. Also, if you annotate your
functions as "nothrow", and your guarded statements do not throw, the
compiler will elide the exception handling code.
Oh, I haven't thought of that, I was sure nothrow was still just a
reserved keyword. Thanks for that information, I will make sure to get
the best of it now :)