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

[REBOL] Re: Rebol Enhancement Proposal - Telephone numbers

From: joel:neely:fedex at: 20-Apr-2001 2:57

Andrew Martin wrote:
> How about adding the telephone number to Rebol? For example:
> The rebol parser rule could be: > "+" some Digit "-" some Digit "-" some Digit >
I suggest not. My (limited) experience is that phone numbers are similar to postal codes, in that there's so much variation in formatting that without some sort of parameterization (e.g., having a "locale" setting as part of an "internationalization" module) it's difficult for even a human to know what's going on. (And I assume that the whole point of the rich set of literal typing rules is to allow REBOL to make the same sorts of inferences that a human would...) For example, conventions for US phone numbers include all of the following variations (by which I mean that I've seen all of these used in printed matter in a way that assumes the reader will recognize a phone number pattern): 1-123-456-7890 123-456-7890 123 456-7890 (123)456-7890 (123) 456-7890 1.123.456.7890 123.456.7890 456-7890 Note: The last case is still ambiguous, in that it assumes EITHER that you don't need an "area code" because you're in the same area OR that you know the area code of the number and the area code where you are and can decide whether to add it yourself. Note 2: The leading "+" is nowhere in the list. I believe that a typical US citizen would be very puzzled to see the string +555-1212 appearing in text unless (s)he happened to recognize the exchange and line segments. Even so, that's not the "natural" way for such a person to type a phone number. I'm certainly NOT arguing that we should constrain REBOL to data formats that are "the American way"; I am suggesting that any formalized syntax -- for cases involving so many variations internationally -- will risk confusing humans or making them learn new rules for things they think they already understand. Such an unintended side-effect seems counter to the REBOL Way to me. Just my $0.02 ... (OH, NO, ANOTHER AMERICANISM! ;-) -jn-