June 18, 2008
Jarrett Billingsley wrote:
> You haven't yet answered the more important question: what exactly is the problem with forward references?  Is it too hard to implement, or is there something much deeper?  Again, I thought D wasn't supposed to have such silliness. 

It's hard to implement, and in some cases (circular references) impossible.
June 18, 2008
"Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3bkl5$1jbp$1@digitalmars.com...

>
> It's hard to implement, and in some cases (circular references) impossible.

In the case of circular references, yes, it is impossible, in which case there's nothing you can do but issue an error.

But you didn't sign up to be a compiler writer because it was easy, did you? And if something like this _is_ too much work for one man -- why not put the DMDFE source on dsource and start accepting help on things like this?


June 18, 2008
Jarrett Billingsley wrote:
> But you didn't sign up to be a compiler writer because it was easy, did you? 

If this was the last issue left, then I'd work on it. But there are other, far more important, things to be working on.

> And if something like this _is_ too much work for one man -- why not put the DMDFE source on dsource and start accepting help on things like this? 

Reorganizing the internals of the compiler is not just accepting a patch.

I've incorporated many user patches to dmd. The source doesn't need to be on dsource for that.

It's not like there's a shortage of things users can work on to improve D. Frank Benoit, for example, tells me there's a huge need for help with dwt, and dwt can turn out to be a big factor in making D a success.

GDC has fallen behind and could use some TLC.

Writing articles, books, papers, and tutorials for D will help a lot.
June 18, 2008
"Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3bqmi$2117$1@digitalmars.com...
> Jarrett Billingsley wrote:
>> But you didn't sign up to be a compiler writer because it was easy, did you?
>
> If this was the last issue left, then I'd work on it. But there are other, far more important, things to be working on.

You always discount forward reference bugs as less important than other things.  What other things *are* there that are so much more important?  New features in D2?  New features in D2 don't help me much when I run into the umpteenth forward reference bug in D1 that's completely un-workaround-able. New features in D2 don't help me when I have to cram every line of my library into a single module because DMD can't figure out what to do with an enum nested in a struct in another module.  Or when DMD can't figure out how to instantiate a template declared later in the file.  Or any of the other twenty-three unresolved forward reference issues in Bugzilla, including two regressions: http://tinyurl.com/3vg6jy

>> And if something like this _is_ too much work for one man -- why not put the DMDFE source on dsource and start accepting help on things like this?
>
> Reorganizing the internals of the compiler is not just accepting a patch.
>
> I've incorporated many user patches to dmd. The source doesn't need to be on dsource for that.

I'm not suggesting patches.  I'm suggesting that you not be the *only* person working on DMDFE.  I'm also suggesting that if the internals need to be reorganized to implement forward reference resolution -- so be it.  Maybe the compiler needs to be rewritten.  It's been in development an awfully long time and D has changed considerably since development started.  The semantic analysis that used to cut it when it wasn't much more complex than Java might not be working for us anymore.


June 18, 2008
Jarrett Billingsley wrote:
> "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3bkl5$1jbp$1@digitalmars.com...
> 
>> It's hard to implement, and in some cases (circular references) impossible.
> 
> In the case of circular references, yes, it is impossible, in which case there's nothing you can do but issue an error.
> 
> But you didn't sign up to be a compiler writer because it was easy, did you? And if something like this _is_ too much work for one man -- why not put the DMDFE source on dsource and start accepting help on things like this? 

While I'm a fan of the idea that someday we could contribute to D more directly, remember that one of the (original) ideas of D was that it was supposed to be easy to write a standards-compliant compiler.  I still think that that's a good goal.

Here's another chance to advocate for my "D simplifier."  Let's have an open-source tool which does all of the hard stuff (like forward referencing and filling in "auto").  Its output would be a simplified dialect of D, which would be easy to compile. :)

Russ
June 18, 2008
Walter Bright pisze:
> Some new stuff to make writing templates easier.
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.031.zip
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.015.zip

Out of curiosity... Why have you implemented template constraints syntax using additional pair of parenthesis?

Some time ago I proposed syntax to extend templates matching. It is in enhancement:
http://d.puremagic.com/issues/show_bug.cgi?id=1827

Was it difficult to implement? Or you didn't want to break current syntax?

IMHO proposed syntax is much better:
- shorter: U: U[N], uint N against U N : U[N=uint]

- natural order of declaration / definition. See above: in my proposition N is declared before using it.

- extensible: if implemented for every case I proposed we would have already possibility to check sth. like this in templates:
void foo(T : class)() {}

- applicable for not only templates, but also is(), alias and static if/static assert.

I can not stop thinking that you try to get a lot with just a minimal effort. But maybe low hanging fruits for D are already in basket?

Could you please give some feedback, so I would feel a bit better with current syntax :-)

Best Regards
Marcin Kuszczak
June 18, 2008
aarti_pl wrote:
> Walter Bright pisze:
>> Some new stuff to make writing templates easier.
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.031.zip
>>
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.015.zip
> 
> Out of curiosity... Why have you implemented template constraints syntax using additional pair of parenthesis?

Because when we tried to stuff everything into the parameter list, it got kinda visually incomprehensible when the constraints got beyond the trivial.
June 18, 2008
Walter Bright schrieb:
> Some new stuff to make writing templates easier.
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.031.zip
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.015.zip

What effect has -fPIC to code?
When do i use -fPIC?
What is a situation, where the version D_PIC is useful in the source code?
June 18, 2008
Reply to Frank,

> Walter Bright schrieb:
> 
>> Some new stuff to make writing templates easier.
>> 
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.031.zip
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.015.zip
> What effect has -fPIC to code?
> When do i use -fPIC?
> What is a situation, where the version D_PIC is useful in the source
> code?

I trust /someone/ will find a use. <g>


June 19, 2008
Jarrett Billingsley wrote:

> I'm not suggesting patches.  I'm suggesting that you not be the *only* person working on DMDFE.  

Anyone else see those "code swarm" videos which visualize the contributors to various open source projects?  Take Python for instance:
    http://www.vimeo.com/1093745
For the first 10 years it's all Guido plus 2 or 3 others, but after 2000 the action really heats up.  All those names swarming around are folks in the svn _checkin_ history. People who had commit access.  Not just patch submitters.

Good language designer? -- some people argue about that, but you have admit Guido van Rossum has definitely been a very good manager for Python.

--bb