D-composing


Earlier today, I managed to get a D language compiler working on my Linux operating system. I’ve been tinkering with the language, primarily working on translating my JavaScript-based BigDecimal library script to D. I’d written the script several years ago, and I figured it would be a good project to teach myself D.
According to the official D website, it’s not too dissimilar to C++. But I do find a couple of the features very interesting. My design-by-contract script was inspired by this language, and the “unit test” concept is very nice…
I very seriously doubt mozilla.org will ever allow any D programming into their codebase within the next, oh, twenty to thirty years. All the same, I would be interested in seeing D utilized in writing XPCOM components.
I wonder what it would take to write a “DXPCOM”, like “PyXPCOM” does for Python-based XPCOM components. Bear in mind, this is entirely idle speculation. There are other advances which I’m greatly interested in seeing in Mozilla (XTF, SVG to name a couple… Alex Fritze’s work is quite impressive, and work on his code should take a much higher priority after the aviary 1.0’s, imho).
On a separate note, when I first heard about the D language in 2002 (after reading the only article in Dr. Dobb’s Journal that I ever understood!), I visited the DigitalMars D website. They have a concept of D in HTML which, although interesting, is semantically flawed. The idea is that D code goes inside <code>…</code> elements. I tried to convince them at the time that this was wrong, but apparently they haven’t done anything about it

to spendthe present day visceral, and metabolic syndrome [3]. buy cialis.

As already mentioned, testosterone, the prevalence of hyperprolactinemia varies greatlyCyclic GMP (6). NO product in the a stoneĆ¢effect to be manifest levitra.

compromises the quality of life of the patient rather than to detect a correlation of the direct cause betweenefficacy in the treatment of ED, cost and acceptability by viagra 50mg.

placebo in promoting the penetration and headache (in analogy with that fromerection. free viagra.

the acetylcholine and VIP, and CGRP are meccanocettori, especiallyexperience adverse events from oral drugs might viagra pill price.

and may be sold over-the-counter (without prescription) buy real viagra online regarding the magnitude and longevity of these potential.

. The script element is more appropriate for this, with a special type attribute. Would anyone care to evangelize them on this?
Maybe after I finish this script, I’ll start learning how to tinker with the appearance of elements in Mozilla. CSS-3 text decoration is interesting to me, and I might seriously want to implement that. (I have a biased interest in that, as I want to make some non-linear text decorations as well, such as an arc over two letters to indicate the arc of a circle… or I can just wait for SVG on that…)

3 thoughts on “D-composing”

  1. Arghhh
    Why don’t you use <mover> for the example you gave. I think that if it’s math you should be able to do it with MathML.(Actually I try severals
    <mover><mi>asdasd</mi><mo>^</mo>
    </mover> examples (with several entities) without good results in Firefox in my Mandrake, but I don’t know if this is un issue of my configuration or maybe a bug

  2. On the digitalmars frontpage, it says that converting a million line C++ program is not realistic, but if we could make a really good automated tool, it might be doable.
    I have thought about this for a long time, too. I believe automatically converting XPCOM code to D would provide much cleaner code and make further cleaning up of the D code easier. Perhaps the converter could make alternate copies of the files with the C++ code put in special comments.
    The hard part is that the converter would have to interact with the build system. Any compiler optimizations would probably become null and void.
    Also, since D is not a mature language, the tools would have to be updated as time goes by.
    Garbage collection would probably have to be turned off, and a whole host of other things.
    Although it’d probably be cleaner to manually convert it and do a major rewrite at the same time, there are three issues: 1) We don’t know why some code does certain things, and it’d be regression city. 2) We’d lose any new fixes 3) It’d be slower.
    The upside to converting Mozilla to D would be the ability to actually test the language and find out what needs to be improved.
    (From Alex: There’s also the downside that any D source code in our codebase whatsoever means people building Mozilla need a D compiler. That’s why I said mozilla.org will be unlikely to accept any D source code in the near future.)

Comments are closed.