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


From: greg::schofield::iinet::net::au at: 11-Aug-2008 23:02

--- Message Received --- From: Carl Read <> To: Reply-To: Date: Mon, 11 Aug 2008 18:52:39 +1200 Subject: [REBOL] Re: REBOL-SIMPLE dialect Carl wrote: It just means you're not a true block-head yet. ;-) True :-0 Blocks are just containers, or that's how I look at them. Consider a string. It's just a container for bytes/characters, right? Well a block's just a container for REBOL values. ie... " if a = b [do this stuff]" IF expects two arguments, the second being a block. And if the first argument returns true, REBOL will evaluate what's inside the block, otherwise it'll ignore it. But that block's no different to this one... "blk: [some stuff]" Meaning a block with code in is no different to a block with data in. And you'll notice IF's behaving like a function, not a command or statment. And just like a function that accepts a string, it's accepting a block. It's that simple. Greg: The flexibility of blocks is one thing, but again you hit on something that caused me a lot of problems, looking for statements/commands which were in fact more like functions. Carl: It's an interesting idea, though I'm not a dialect expert and don't know REXX, either. However, wouldn't a simple language like that, (only having string variables, the need for end"s, etc.), make the transition to REBOL proper just as hard as it's been for you with moving from REXX?" Greg: I think it could be superficially REBOL-like, an entry point language. It would be verbose, and compared to real REBOL slower and much more mechanical. It would have to be designed by someone absolutely at home with REBOL proper, because the purpose of the language/dialect would be in itself a gentle introduction to REBOL proper. In reality as a langauge it would not be doing much besides conditional operations, iterations, assignments and basic maths - everything else would be just formal function calls. Typless data (resolved within functions), line based processing. I don't know how it could elegantly be done, but I was thinking of a three level dialect. That is the top level is REBOL-SIMPLE, in which simple functions could be created, another level of function creation using another set of more low level functions. And finally functions wrapping up real REBOL. Using it at the top level (REBOL-SIMPLE) allows the novice user to quickly arrange a fairly simple over arching script. The function level (next stage down), still wrapped as a dialect, introduces another set of complementary tool/functions allowing users to create more complex functions, and then a function environement that is near enough to pure REBOL. It may well be a silly suggestion, but I would like to have a lanaguage I could introduce to others as a really simple way to get things done, but then allows a fairly seamless extension into more complexity, already wrapped in a simple overcoat so that they can concentrate on creating a fragment at a time and still have a fully functioning script.