OT: CS education gone wrong (Was: Re: TDD is BS?)
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Jun 23 09:28:55 PDT 2013
On 6/23/13 9:21 AM, Adam D. Ruppe wrote:
> http://arsdnet.net/dcode/dhp.d
>
> It works by just reading the file and translating everything outside the
> <?d?> into a giant writeln(string literal), pasting in the D code, then
> compile+running it, inserting a bunch of imports so it works.
>
> dom.d now supports those kinds of tags, it could probably be even nicer,
> especially with a D lexer so it doesn't think "?>" is the same as ?>.
> But as I'm sure I said then, this is a bad idea anyway since mixing code
> and html data leads to ugliness, whether the code is php or D.
Nice! (BTW:
foreach(ln; stdin.byLine) {
string line = ln.idup ~ "\n";
is simpler written as
foreach(ln; stdin.byLine(KeepTerminator.yes)) {
string line = ln.idup;
.)
Would be awesome if an Apache extension would make it trivial to write
Web pages in D.
Andrei
More information about the Digitalmars-d
mailing list