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

[REBOL] Re: Parsing comment

From: brett:codeconscious at: 24-Sep-2002 20:24

Hi Jason,
> > who has, and who finds it hard to use because the parser cannot know > > the end of a function's parameter list -- that's only known at run > > time, once the function is called.
Ingo and Tom have pointed out how the the parser that is being referred to is the language parser and why it is difficult to identify a function's arguments or even whether it is a function anyway. More than this though, it is a funny comment in the context of educating novice programmers. The trials and tribulations of a parser don't seem relevent to someone learning a language.
>> Sounds like dead on arrival to me, > > as far as language design goes.
This to me implies that the writer is singularly focussed on the design of Python and potential improvements. No real interest in REBOL as far as I can see here. It indicates a certain assumed world view as far as the way things should work. Rather that writing "dead on arrival" that person would have done themselves a favour and perhaps learnt something by instead asking the question "I wonder if it is appropriate to apply my ideas of language design to REBOL in this instance?". The REBOL language primarily consists of syntactic forms e.g http://blah... is an url!. If you need the In "base" REBOL, only functions (at evaluation time) imply any sort of grammar (any specific ordering of items in the source input). Though the exception might be the operators +, -, = etc. The whole point about the design of REBOL is, I think, that it is a foundation that enables many languages to be designed (dialects). Dialects are the languages of REBOL where the grammar is made apparent. You can create a dialect/language so that a parser can know where a function ends, etc. It is just that you have to write the parser (PARSE is a tool to assist this). Writing a dialect and a parser for it is worthwhile only if it adds value in some way. For example, some time ago Andrew Martin published his XML script which evalutes a dialect he defined. The result of the evaluation is well formed XML. His dialect added value by enabling a simple syntax to generate XML. VID adds value by enabling a simple syntax to generate visual interfaces for REBOL/View. Just because we can read the source of Andrew's XML function does not mean that the input to it it isn't *real* executable code. In REBOL it is the evaluation of the input which defines the meaning/effect. Andrew's XML function becomes another mezzanine alongside LAYOUT etc. In this way we end up "growing" REBOL in ways best suit our requirements. I don't know Python, but I'm guessing that the main way to "grow" Python is through class libraries. REBOL's dialects can be "melded" together - the like paren! inside VID or a parse rule. They are embedded languages, which has been reported as an extremely powerful way to construct programs. Class libraries tend to interact like oil and water - they don't, your main program has to do it for them.
>>.... So if we want to learn from Rebol, we > > must try to learn from other ideas in it, not from the core language > > design.
I guess people will always miss out on varying experiences and things that can be learnt because it it is in fact really hard to let go of pre-conceptions. :^) Regards, Brett.