Right now, what's the most important for the success and adoption
Bruce Adams
tortoise_74 at yeah.who.co.uk
Sat Sep 29 16:38:29 PDT 2007
Brad Roberts Wrote:
> Daniel Keep wrote:
> > I can't really disagree with what anyone else has said so far, so I'll
> > throw in something new:
> >
> > A new D compiler that is 100% independent of the DigitalMars code base.
> > Doesn't have to be efficient, doesn't have to have awesome code
> > generation, but it needs to exist and it needs to be conformant.
> >
> > And it needs to be written in D itself. :)
> >
> > Why? Take a look at how changes get added to Python. Someone comes
> > along, and thinks "hey, X would be a useful feature!" They introduce
> > the feature to the newsgroup, write up a Python Enhancement Proposal,
> > and discuss it. In D's case, we stop about here (albeit without any
> > kind of formal proposal system). With Python, they then typically go
> > off and write a patch to the interpreter to implement the change so that
> > people can experiment with it to see if it's useful or not. Having an
> > easy to modify D compiler written in D would make this much easier, and
> > allow proposed features to actually be prototyped instead of those
> > long-winded entirely hypothetical threads on the NG where people argue
> > endlessly about a feature they can't actually test.
> >
> > There's also the benefit that implementing the language spec will force
> > the language to be completely defined; it'll highlight holes, and ensure
> > the spec makes sense.
> >
> > Also, we can finally say to people: "yes, D does have a compiler
> > implemented in D itself." Not that it really matters, but perception
> > does. :)
> >
> > Anyway, just thought I'd add something instead of just parroting. Now
> > if you'll excuse me, I'm off to get some biscuits...
> >
> > -- Daniel
>
> While a D compiler in D itself might be interesting in some ways, it'd
> be, well, highly non-trivial to produce. Instead of investing man years
> of effort duplicating the front end, optimizer, and code generator that
> lives in dmd, how about finding a project that is in need of developers
> and work on it instead? It's not like there aren't tons or that we're
> overflowing with manpower to spend on redundancies.
>
> For those interested in experimenting with adding features to D can pick
> up gdc and play around _right now_. For an awful large subset of
> changes, they would be isolated to the front end parts exclusively and
> wouldn't need to get terribly involved with the gcc layers. Doing that
> has the additional advantage of having the potential to actually produce
> a diff that Walter can use as a basis for actually adopting the change.
>
> Anyway, just my opinions.
>
> Later,
> Brad
A classic quesiton often asked when a new language is dreamed up is what is the compiler written in. If it isn't written in the new language a school of thought says you should run away.
The essence of the argument is, if your shiny new language is so much better to write easily readable, enhanceable and bug free code why aren't you using it for the compiler for which that is so important.
Also writing a full scale compiler is a big enough project to test the metal of your new language.
I don't know about the gdc front end itself but gcc for all its power is not pretty to look at on the insides. However it is written in C so there's no reason a gdc clone couldn't be written in D. My understanding was that gdc was based on part of dmd with whatever machinations good and bad lurk beneath that beasts exterior.
It could be so much prettier in D.
[asbestos suit]
While we're at it why don't we rewrite the linux kernel in D too :)
[/asbestos suit]
More information about the Digitalmars-d
mailing list