Douglas Alan wrote: >For instance, procedural macros allowed Lisp to turn itself from a >procedural language to an OO language without changing the language at >all. A very capable OO extention (one that supported multimethods and >a meta-object protocol) could be added to the language using only >macros. The language was able to *grow* without any centralized >control. Here's me asking for clarification on the meaning of "procedural macros" again. Would Tcl be considered a language based almost entirely on procedural macros? It let you introduce your own loop constructs, classes, exception framework, etc. Quoting Steve Lamb: >> Redefining the very semantics and syntax of the language means it is >> a new dialect. > >Procedural macros don't allow you to "redefine the very semantics and >syntax of the language". They only allow you to add new terms to the >language, just as defining functions and objects allows you to add new >terms. At one of my clients there are at least three different vocabularies for essentially the same thing - the words used in the literatur, the words used by the chemists and the words used by the implementation of the chemists viewpoint on a computer. The software suffers as a consequence because aliases for the same ideas are used through the system and docs, and there isn't a precise idea of when one word should be used over another. I've always been concerned about languages which allow you to define new terms to the language because it would just exacerbate the language problems people already have. > The type of term you can add to Python with a function is >somewhat limited compared to what you could add with procedural >macros. Sometimes a more powerful term-adding capability is >incredibly useful and allows you to make programs that are more >elegant and easier to maintain. Perhaps, but my feeling is that the level of training you need for that is greater than most of my clients - chemists and biologists - want to go through. Note that since I've never used a language (other than Tcl?) with these sorts of macros I don't have specific knowledge of the pros and cons. I can say that in Tcl I rarely saw researchers without a very strong background in CS (degree level) defining their own new language constructs. Also, the lack of a *standard* way to do objects (this is back in the 7.x days) meant that no one used them - no one rolled their own OO system. I can also point out the almost complete nonexistence of a major package in computational chemistry or biology written in a language supporting hygenic/procedural macros as an indicator that *something* prevents their wider use in my field. Andrew dalke at acm.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4