Is D a useful programming language for the web?

Chad J chadjoan at __spam.is.bad__gmail.com
Sun Mar 7 08:08:49 PST 2010


Nick Sabalausky wrote:
> "Chad J" <chadjoan at __spam.is.bad__gmail.com> wrote in message 
> news:hmul75$qsm$1 at digitalmars.com...
> 
> ...
> 
>> Question though, why not just have llvm emit code in another language?
> 
> A few (admittedly not very big) reasons, in no order:
> 
> - I wanted some experience writing lexer/parser code on my own.
> 
> - LLVM's written in, umm, either C or C++, not D, and I'd rather not have to 
> deal with C/C++ (*especially* if it involves string manipulation) or 
> D<->C/C++ bindings if I don't have to (I spent years with C/C++...then I 
> found D. I'll be very happy if I never have to go back).
> 

amen.

> - AIUI, LLVM's intermediate representation is very low-level, so high level 
> code generated from it would be pretty much unreadable and bear no 
> resemblance to the original code. This is certainly fine for many uses, but 
> I wanted to take a more generalized approach, to allow for more basic source 
> manipulations than just language translation (such as customized 
> pretty-printing and whitespace-stripping), or to act as the first step in 
> maintaining a port of some app/lib in another language, or to allow for 
> "language-tweaking", such as "python with curly-brace scoping", or "VB with 
> semicolon statement-terminators" (The motivation and ideal goal behind this 
> is to make many langauge feature debates as pointless as a debate on what 
> tabsize your editor should use). Yea, it's very ambitious, and as such, I 
> have no idea how it'll actually turn out. But I think it's at least worth 
> attempting.
> 
> Goldie's really aiming to be more of an evolved ANTLR rater than something 
> like LLVM. The closest competing project to Goldie would probably be Gazelle 
> (or an ultra-souped-up version of GOLD Parser Builder, which Goldie is 
> currently oriented around, or something like JetBrains MPS, but not tied to 
> a single IDE and not so insanely slow and bloated).
> 
> 

OK, neat.  Thanks for explaining.



More information about the Digitalmars-d mailing list