Inherent code performance advantages of D over C?

Manu turkeyman at gmail.com
Sat Dec 7 22:02:32 PST 2013


On 8 December 2013 14:07, Walter Bright <newshound2 at digitalmars.com> wrote:

> On 12/7/2013 6:07 PM, Manu wrote:
>
>> At least in certain types of code, which perhaps you don't spend an awful
>> lot of
>> time writing?
>>
>
> Funny thing about that. Sometimes I'll spend all day on a piece of code,
> then check it in. I'm surprised that the diffs show my changes were very
> small.
>
> I suppose I spend far more time thinking about code than writing it.


Precisely my point. I have a strong suspicion that you've spent many
consecutive years now writing code in that way.

I don't think the job of a systems/tech programmer is a close approximation
of probably the vast majority of modern programmer's days. I think the bulk
majority of programmers are employed to bash out code and string things
together to produce their particular product. Be it on the web, or some
application, or whatever. I think 'most' code is the stringing together of
libraries in ways specific to the project requirements, and that sort of
code _really_ benefits from powerful tooling.
Also most projects have unstable goal-posts, which leads to inevitable
refactoring of your project whenever project requirements change.

Current D tooling offers... well, barely anything. VisualD and the like are
good first steps. We basically have syntax highlighting, and to a very
limited degree, suggestion + auto-completion. I couldn't (**wouldn't) work
without those as a minimum, but these only begin to scratch the surface
though when compared to say Java and C# tooling (examples I'm familiar
with).
I've often wondered what the DMD front end could offer if it was properly
extracted into a library with a well designed API for tooling projects to
interact with.
One of the hard problems is that you want tools to make proper suggestions
and highlight errors and stuff in realtime, on code as it's being typed,
which doesn't actually compile due to incomplete expressions or errors.
I suspect systems like the CTFE system, which is able to perform semantic
analysis (and execution) on subsets of code, ie, it seems it can evaluate
expressions even where there are compile errors in surrounding code.

That old Eclipse tool that offered a 'intermediate' view that unfolded
mixins and template expansion was awesome. I would find that so useful!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131208/8772ab87/attachment.html>


More information about the Digitalmars-d mailing list