digitalmars.D - Litterate schmitterate
- Georg Wrede (54/54) Sep 27 2006 Litterate Programming was all the rage a few years ago.
Litterate Programming was all the rage a few years ago. In article http://www.scottcollins.net/articles/Loops.html Scott flaunts his agility with languages and the results of using Litterate Programming tools. What came to my mind was a few discussions with Walter some years ago, that rose from the fact that the DMD compiler can use HTML as input. I suspect sensations of Literate Programming had influenced this decision. However, it seems that this feature has been largely unexploited by the community, which is a shame. It becomes understandable if one considers this HTML-decision to be 'just an expression of the subconscious aspiring towards goals perceived as worthy or useful', without the rigorous cognitive analysis and evaluation that such a major decision deserves, and therefore as half-baked as the thoughts in this text.(1) (In English: This is gonna be a good thing, just don't know yet or have the time to sort out the details.) The mundane reason for exactly why HTML-source code for D is extinct is probably not that it's a bad idea, rather, that it's possible that people have not found any way to incorporate HTML-d files into their development toolchain. (How to edit a file that needs both HTML and D highlighting, how to figure out the line numbers for erros, how to combine DDOC comments with regular comments with regular text in the file?) (One side track of our discussion was about whether it is good or bad to throw the HTML through a preprocessor, which could potentially enhance both the HTML and the .d code, for example by unraveling some ENUM vs. case details (IIRC)). --- In another discussion I was entertaining the notion of a program code editor where the "program source" never actually existed, neither in a source file nor as a string in memory. Having said the above and all the previous, I must say it felt eery to read about the Leo Editor. http://webpages.charter.net/edreamleo/front.html Leo implements many of the ideas that were floating in the air at the time of our discussions. --- Literate programming seems to be (not an alternative of, but an enhancement to) something we probably should start using, irrespectively of whether we adhere to some other Programming Paradigm or whatever. My question is, wouldn't it be much more efficient to implement something Leo like in D than in Python. (Ok I admit: if we exclude the in-line directives and enhancements that are possible thanks to the mere fact that Python is an interpreted language.) Something akin (and possibly more powerful) could be achieved if this Leo-successor implemented a way of writing ad-hoc D routines that would automatically get included (somehow DDL, rdmd, and/or plugin like) if written in-line. --- (1) I have thrown out merely my feelings here, and thus the ideas here are, at best, equally "half-baked". Still, somehow it would be an itriguing thought if one day a Leo-like editor would be an integral part of any DMD distribution, including all the infrastructure and possibilities that came with it. "Why settle for a regular IDE for an exceptional language?"
Sep 27 2006