DeRailed DSL (was Re: compile-time regex redux)

Walter Bright newshound at digitalmars.com
Sat Feb 10 23:35:06 PST 2007


Bill Baxter wrote:
> Wow, this is sounding sillier and sillier.
> It seems pretty clear to me that the answer is simply that Andrei 
> doesn't really know enough about RoR give a concrete example of how 
> better metaprogramming would be useful for DeRailed.  He pretty much 
> said as much in the last mail.  But it would be good if he gave some 
> more practical, concrete examples of places where it would help.

For the record, I know next to nothing about RoR except that:

1) RoR has clearly been the "killer app" that has launched Ruby into one 
of the top languages in use today.

2) I thought RoR was a DSL addon to Ruby. Perhaps such supposition was a 
huge misunderstanding on my part.

I think it's way cool that you guys are working on DeRailed. If better 
compiler DSL technology won't help that, well, rats! But I don't know 
enough about the problem DeRailed is trying to solve to suggest any way 
in which a DSL might be used with it.

> Note that what's going on here is *talk* about features that may or may 
> not get into DMD any time soon.  In fact you could say this whole 
> discussion has been about *preventing* features from getting introduced. 
>  At least in an ad-hoc manner. This meat of this metaprogramming 
> discussion started with Walter saying he was thinking of adding compile 
> time regexps to the language.  Without any discussion about whether 
> that's a good thing or not and what the ramifications are, then it's 
> just going to happen, whether it's good for D or not.

I beg to differ on that. The reason I started this thread was to not 
post a fait accompli, but to elicit discussion, especially since builtin 
regex has been thoroughly reviled in the past.

And it's pretty clear that it's going down in flames again <g>. I think 
there's a better way now, and this discussion has helped find it.

> So the question 
> becomes what should D look like?  Rather than add hoc features, what do 
> we really want D's metaprogramming to look like?

Yes, indeed.

What Kris brings to the table is he's building key foundation libraries 
for D. What Andrei brings is the academic rigor that I lack.

I know from these messages it seems that all we talk about is 
metaprogramming, but actually most of our discussions (and most of 
Andrei's work on D) are about filling in mundane gaps in the language, 
like the lack of a proper const. And I know Kris really wants a useful 
const <g>.



More information about the Digitalmars-d mailing list