Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Language-oriented programming

 [1/5] from: rboyd:coastalenvironmental at: 20-Sep-2007 9:38


Sounds "vaguely" familiar. :-) http://www.infoq.com/news/2007/09/Language-oriented-programming Language-oriented programming : an evolutionary step beyond object-oriented programming? Object oriented programming provides a useful modelling paradigm based on hierarchies and tree shaped abstractions. Reality however is not always hierarchical, highlights Neal Ford. Its "tangled branches and interconnections" are rather difficult to model with idealized tree pictures. And this results in a widespread use of aspects and XML and eventually adds complexity undermining the very purpose of abstraction. To remedy to this issue the abstraction level should be upgraded and to this end Ford suggests using languages rather than hierarchies as a modelling mechanism. According to Martin Fowler object-oriented domain modelling allows to build up a vocabulary but the grammar -- ways to combine these vocabularies -- is not defined; DSLs add this grammar side. Therefore language-oriented programming inducts "this shift of moving from thinking about vocabulary, which is objects, to the notion of a language that combines vocabulary and grammar." As for IDE support there are today at least three major vendors offering this kind of tooling to support language oriented programming: Intentional Software developed by Charles Simonyi, Microsoft's Software Factories, Meta Programming System developed by JetBrains. [ Above quote focuses on IDEs, not languages ... but still should mention REBOL ]

 [2/5] from: edoconnor:gm:ail at: 20-Sep-2007 14:24


Language-oriented programming is interesting and caused a small stir a couple of years ago. Unfortunately, it hasn't gone anywhere, and I think we won't see much in this realm until an app or framework emerges that really drives the point home. Currently Ruby-on-Rails, and more generally the Ruby language, has gained notoriety for DSLs, although Python also has examples. Perl recently included grammars-based parsing, so it could be a contender as well. REBOL, of course, has had its sights on dialects for a long time. I'm no expert, but the challenges I see for dialecting are: 1. Developers seem more comfortable with a neutral, standards-based format such as XML. This de-couples the data from the processing language and doesn't mandate a single tool like REBOL at both ends to interpret messaging transactions. 2. Dialects (as I've understood them) can only be composed of REBOL values. Although REBOL has a rich variety of values, it is possible to encounter datatypes which will not load into REBOL. 3. Parse dialects (as opposed to specialized groups of rebol statements) require a solid foundation in parse, and the current docs are a bit thin. I would be very interested in learning what R3 might bring to reassert REBOL's prowess in dialecting. If somewhere down the road there are plans for the following, things could get more interesting: A) a built-in tool for creating/editing parse dialects B) stronger XML, JSON, YAML support C) ability to create new datatypes Ed On 9/20/07, Richard Boyd wrote:

 [3/5] from: tim-johnsons::web::com at: 20-Sep-2007 12:05


On Thursday 20 September 2007, Ed O'Connor wrote:
> Language-oriented programming is interesting and caused a small stir a > couple of years ago. Unfortunately, it hasn't gone anywhere,
:-) What about parse? Common LISP has used the DSL approach for decades, I believe. I don't have a lot of time to elaborate right now, but I must say that rebol lends itself *very* well to dsl. I make a great deal of this approach (dialecting), usually the dialect is sitting "on top off" an object. A superb example of a dialect is Andrew Martin's ML dialect, which should be available from rebol.org. After using 'ML, one would never want to go back to using literal strings or tags for emitting html for any large structure. MTCW Tim Example below: ;; 'htm is a simple wrapper for 'ML, auto-composing any parens content: htm[ form/action/method (.g/blog-url) "POST"[ table/border/cellpadding/cellspacing/width 0 2 1 "100%" [ tr[td/align "right"[b["Name:"]] td/align "left"[input/type/name/value/size "text" "name" "$name" "45" ] ] tr[td/valign "top"[p/align "right" b[(brs 1) "Comment: "]] td[textarea/name/rows/cols "text" 8 58["$msg"]] ] tr[ td/width 87[" "] td[input/type/name/value "submit" "Cancel" "Cancel" input/type/name/value "submit" (button-text) (button-text)] "$more" ] tr[td/width/height 87 25[" "] td[i["Note: HTML tags allowed for:" (tags-allowed)]] ] (newline) input/type/name/value "hidden" "cmt" "$file" ] ] ]

 [4/5] from: edoconnor:gma:il at: 20-Sep-2007 17:08


On 9/20/07, Tim Johnson wrote:
> On Thursday 20 September 2007, Ed O'Connor wrote: > > Language-oriented programming is interesting and caused a small stir a > > couple of years ago. Unfortunately, it hasn't gone anywhere, > :-) What about parse? > Common LISP has used the DSL approach for decades, I believe.
This is true, and I didn't mean to suggest that DSLs emerged 2 years ago, but the term language-oriented did. Sadly, I don't think are any DSL lanuages (in the classic sense) which are considered mainstream. There is quite a spectrum of what DSL-ish constructs: 1- a high-level abstraction 2- a function, or collection of functions 3- a markup/formatting language or shorthand 4- a little language such as SQL or the UNIX utils 5- a 4GL or NLP-ish script such as ZIL (Inform Language) or AppleScript 6- a lingo or domain language (e.g., Iced Decaf Triple Vanilla Skim latte) But I prefer not to hash that out here. My (admittedly ineffective) definition of a DSL is more like the FCC's definition of indecency: "I know it when I see it." I suspect that the less a construct looks/feels like something that might be called a DSL (such as #6 above), the more successful it probably is! Time to go study LOP at the knee of my local barista.

 [5/5] from: tim-johnsons::web::com at: 20-Sep-2007 14:58


On Thursday 20 September 2007, Ed O'Connor wrote:
> On 9/20/07, Tim Johnson wrote: > > On Thursday 20 September 2007, Ed O'Connor wrote:
<<quoted lines omitted: 19>>
> looks/feels like something that might be called a DSL (such as #6 > above), the more successful it probably is!
I think of DSL in terms of degree. As in OOP there are degrees - I used to do OOP in ansi C. It wasn't Object programming like smalltalk or even python, but employed some of the priciples. I'm happy that rebol provides *some* degree of DSL
> Time to go study LOP at the knee of my local barista.
That would be an OOPs if I did that :-) tj

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted