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

[REBOL] Re: R: Re: When to use refinements? : was => {Re: Re: R: Re: VID: choice

From: brett:codeconscious at: 31-Jan-2002 12:12

> > The functionality does'nt change, but at the same time as > > *simplifying* the amount of programmer effort, VID has subtly *added* > also, > > because people need to learn syntactic exceptions to REBOL's norm. > > This surely goes gently against REBOL's philosophy. > > I think Jason is right. Even if I'm using a "dialect", even this one
> be "coherent". When I find an exception in a programming language, I must > learn either the standard syntax plus the exceptions.
I don't think it is valid to treat dialects as part of the Rebol programming language. Imagine you want to send a stock trading dialect to a client to learn. Surely they would find learning this easier: Sell 100 shares of "Acme" at $4.55 per share Sell 100 shares "Acme" at above $4.55 per share ... than this: sell 100 'shares "Acme" 4.55 sell/limit 100 'shares "Acme" 4.55 'above Here's Rebol Technologies definition of a dialect (Rebol Core User Guide): Dialects are sub-languages of REBOL that use the same lexical form for all data types but allow a different ordering of the values within a block. The values do not need to conform to the normal order required by REBOL function arguments. Dialects are able to provide greater expressive power for specific domains of use. For instance, the parser rules themselves are specified as a dialect. The point here then is that a dialect is different to the REBOL language. As such, I think a dialect should be coherent within itself. Jason wrote about VID - "people need to learn syntactic exceptions to REBOL's norm" But what constitues REBOL's norm? I think REBOL's norm is remarkably grammatically unconstrained apart from the order of function arguments (that why pretty printers are hard to write). VID however, is more grammatically constrained than REBOL. So people *must* learn the specifics of VID. For example, think about what the associated meaning *in VID* is for each of the following VID elements: - set-word! - COPY - paren! I think the following idea is amusing (I often amuse myself and no one else) or maybe it is just provocative. Imagine comparing these abritrary semantics levels of REBOL and Java: Dialects <----> .java Words and Values <----> Bytecodes REBOL Interpreter <----> JVM Well it amuses me to think like that sometimes :) The specific question Jason asked was why VID does not make use of refinements. Only Carl can answer that definitively. One possibility is that adding refinements may have made VID harder unjustifiably harder to interpret/manipulate, both for the VID interpreter and for people who want to treat VID blocks as data to manipulate programmatically. Brett.