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

[REBOL] Re: Periods as parts of rebol words?

From: joel:neely:fedex at: 11-May-2002 8:51

Hi, Tim, Syntactically speaking, periods are just another character that can appear in the name of a word. Perfectly OK. As for the non-syntactical arguments... Tim Johnson wrote:
> * Gregg Irwin <[greggirwin--mindspring--com]> [020510 16:51]: > > The following characters are not allowed in words: @#$%^, > > > > Technically, you can do it. I personally don't think it's a > > good idea, for the following reason: REBOL is designed to be > > a good language for humans. >
I just don't buy this one, for a whole list of reasons, including the following samples: * There's nothing new about idea of having a programming language that is supposed to resemble natural so closely that humans of the non-programmer species can write code. Nonsense. That was supposed to have been one of the key design criteria of COBOL. The claim was even made early in its life that it resembled English so well that managers would be able to read their subordinates' programs to check them for errors. Yeah, right... The same kinds of fatuous claims have been made for BASIC, SQL, spreadsheets and spreadsheet macro languages, and on and on and on... The claim was also made about FORTH that, as an extensible language, one could bootstrap up to a set of defined words that end users could employ as an interactive or scripted command language. This "impossible dream" has never worked, and IMHO never will. Humans can't write real, non-trivial programs without actually learning programming skills. Sugar-coating that fact is at best a waste of time and at worst deceptive. * There are so many factors in the design of REBOL that already violate good human factors practice that the issue of dashes versus periods as intra-word punctuation just doesn't seem to be that significant. Such issues as ensuring referential transparency, consistency, the principle of least surprise, proportionality (things that make a big difference should look really different, things that don't make much difference shouldn't) and on and on and on...
> I'm not sure if I find "reading" the dot seperators as easy > as typing them, to be perfectly frank... >
I'd suggest that a more important question is "Who's your audience?" If you're only writing programs to serve (or amuse ;-) yourself, then construct, format, and spell your code however you wish -- as long as you don't confuse yourself, of course! If you expect other people to (ever!) read it, then think about their likely background and habits, and try to avoid unnecessary opportunities for confusing or misleading them. I'd suggest against using internal dots, for the following reasons: * Other languages (yes, we're programmers here) are much more likely to use dots to indicate subordination/selection. Just as REBOL can use "hee/haw" to indicate the "haw" component of something named "hee" (e.g. an object's attribute), many other languages would write "hee.haw" in that same sense. * This is consistent with the use of dots in other human-oriented settings, either computer-related or not: - The dots in an IP address indicate successively finer distinctions on what has come before. - The dots in a host name (although in the reverse order) also indicate hierarchy of containment. - In some countries, the dot is used as a radix point, so that the value 3.76 indicates seventy six hundredths within three. - I frequently see dates (2002.05.11) and telephone numbers (1.800.555.1212) internally punctuated with dots, which again indicate membership or subordination. - The labeling of elements in an outline (at least when I was back in freshman English...) use dots between levels of hierarchical containment. Of course, if we're going to take this resemblance to natural language seriously, we'd also avoid using hyphens since they are often used to indicate coordination (in the Cartesian sense) or subtraction (because the absence of whitespace in income-deductions in normal "English" is not considered significant). So... I suggest that you pick a style that: - you're comfortable typing and reading, - won't confuse any (likely) future reader, - you can follow consistenly, - doesn't look deceptively like (or pointlessly different from) other usage in the world you inhabit, and stick with it. Good luck! -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]