Why I'm hesitating to switch to D

Adam Ruppe destructionator at gmail.com
Wed Jun 29 11:23:26 PDT 2011


Walter Bright wrote:
> Ddoc is a macro system. std.ddoc defines the macros to translate from
> Ddoc to HTML. I don't really understand your comment.

Take a look at this definition:

===========

DDOC = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>

<!--
        Copyright (c) 1999-2010 by Digital Mars
        All Rights Reserved Written by Walter Bright
        http://www.digitalmars.com
  -->

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<title>$(TITLE) - D Programming Language - Digital Mars</title>
<link rel="stylesheet" type="text/css" href="../style.css">

<script>
function listanchors()
{
    var a = document.getElementById("quickindex");
    if (!a) return;
    var newText = "";
    var hash = new Array;
    var n = 0;
    var values = new Array;
    // List all anchors.
    for (var i = 0; i < document.anchors.length; i++)
    {
        var a = document.anchors[i];
        var text = a.name;
        if (hash[text] > 0) continue;


============


While that's technically a ddoc macro, that has very little impact
on someone wanting to edit the page's overall structure, appearance,
or dynamic behavior.

If he just writes more plain html (etc.) inside that one macro block,
it will be applied to the site.

Don't have to learn special escaping rules or whatever; if you know
how to write html, you can edit these pages. What you see there
is what you get.


More information about the Digitalmars-d mailing list