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

[REBOL] Re: Teaching Rebol => was:{Re: Re: Parsing comment}

From: jason:cunliffe:verizon at: 26-Sep-2002 1:53

Andrew wrote:
> I don't think it's possible to get syntax hints for Rebol, unless one tries > to execute the code. A Rebol IDE could show that a word refers to a function > that takes X arguments of Y type/s. That's a useful hint, but that fails if > the script (or a related script) replaces the value for that word when > executed! :) It will also fail when looking at a word used in a dialect.
ok.. RIDE ideas I donlt quite undetand why not - what does 'help do? REBOL interpreter is running so it knows as soon as it sees a white space that a word has been entered. It can do several things right then: - lookup the word indicate to the use, perhaps highlight the word in special color. [RIDE user prefs can redefine all this] test if it's a - core word - word defined in this session show so - word defined by import show so When a word is redefined that is useful to know too, even if the RIDE can't tell you at that moment what it is exactly. Just as it knwos about white spaces it knows about words ending in ":" I find at the shell when testing, I face confusion often if a word has a value, for example is holdigg on to 'old' values. For exactly the same reasons one needs to invoke the someword: copy [] idiom inside functions. When one loads an external script in the shell with 'do there are a load of fucntions defined there. The first helpful a new RIDE could do is tell you what functions are named. source help reveals a word 'dump-obj source 'dump-obj reveals 3 functions 'clip-str and 'form-val, 'form-pad Perphaps for system words it is not so relevant. But for externasl user scripts I think it woudl be very helpful. Once can al;ways lok ath source, but the issue is what kinds of dynamic helps are good. importinga script adn immediately getting a remionded of teh fucntion name swuodl be very useful. Proabbly in a parallel window so one does not break the flow of the actual session. I don't knwo if what i sugest is very eays or terribly hard.
> For example, in my Wiki script, I use 'form, with two different meanings. > One is Rebol's usual 'form, the other is my ML dialect 'form that means > create a HTML form with the following block! value. Similarly with 'head as > well, one is Rebol's usual 'head, the other 'head means create a head > section in HTML from the following block.
so would'nt that be good to know ?
> Looking at a small section of my Wiki script, one could be easily confused! > It's not until one sees the entire context that it makes sense. This seems > to me to be a force that encourages me to keep scripts short and to have > powerful words.
Yes the art of REBOL must be to keep it short with well crafted words. Dialects presumably can help do that. But there must be a better way to indicate when one is stepping in or out of a dialect? ./Jason