Rebol Enhancement Proposal - Telephone numbers
[1/6] from: al::bri::xtra::co::nz at: 20-Apr-2001 20:25
How about adding the telephone number to Rebol? For example:
Telephone: +64-6-8354110
>> type? Telephone
== telephone!
It would behave a lot like the issue! datatype, but have telephone!
datatype. Refinements could include:
>> Telephone/International
== +64
>> Telephone/National
== 6
>> Telephone/Local
== 8354110
The rebol parser rule could be:
"+" some Digit "-" some Digit "-" some Digit
The only trouble I have at the moment is determining if is this pattern
would be suitable for other countries. While this works for NZ, it might not
work for other nations. Any one know if this wouldn't work for them?
Andrew Martin
ICQ: 26227169 http://members.nbci.com/AndrewMartin/
[2/6] from: slok00:yah:oo at: 20-Apr-2001 1:46
some countries, eg. Singapore, do not have Area Codes.
so a typical Singapore number will be +65-2322724
where 65 is the International number.
the datatype should also not enforced or required that
the user enter the International number. Uses normally
only enter International numbers for overseas contact.
just a thought
YekSoon
--- Andrew Martin <[Al--Bri--xtra--co--nz]> wrote:
[3/6] from: al:bri:xtra at: 20-Apr-2001 21:12
YekSoon wrote:
> some countries, eg. Singapore, do not have Area Codes. so a typical
Singapore number will be +65-2322724 where 65 is the International number.
> The datatype should also not enforced or required that the user enter the
International number. Uses normally only enter International numbers for
overseas contact.
So it'll be better then, to just use Rebol's existing issue! datatype, with
perhaps some access functions to pick out common parts.
Andrew Martin
ICQ: 26227169 http://members.nbci.com/AndrewMartin/
[4/6] 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-
[5/6] from: ryanc:iesco-dms at: 20-Apr-2001 11:23
Hmmm... Even though:
* It would make parse operations a tiny bit easier.
* It would help in the exchange of data
There are a few more negs:
* feature bloat
* You dont add telephone numbers, or perform other operations with them.
* It can written simply 64'6'8354110 or as a robust dialect [64 6 8354110 *9
wait 5 "password" #]
* So many different standards and conventions
I am not strictly opposed to a telephone number type, as they are frequently
used and exchanged. I suppose you can reliably divide telephone numbers into
two parts. The always used local part, and the optional dialed long distance
part that changes with location. Example:
[ 64'6 8354110 ] ; out of local area
[ none 8354110 ] ; within local area
Note that in some areas pauses must be inserted into a number. For instance I
have heard of people in the US that have to wait 3 seconds just to get a
dialtone--could be worse in other countries. Modems use #"," to represent a
pause. #"*" and #"#" are also a good idea to support. The characters,
especially commas, would complicate searches.
Its possible the url type could be used? Hmmm...
>> Andrew: open/lines phone://23-234-234-3533
>> first Andrew
== "Hello?"
>> insert Andrew "How many REBOL programmers does it take to change a light
bulb?"
>> first Andrew
== "I dont know?"
>> insert Andrew "None. Thats a hardware job!"
>> close Andrew
--Ryan
Andrew Martin wrote:
> How about adding the telephone number to Rebol? For example:
> Telephone: +64-6-8354110
<<quoted lines omitted: 20>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400
I am enough of an artist to draw freely upon my imagination.
Imagination is more important than knowledge. Knowledge is
limited. Imagination encircles the world.
-Einstein
[6/6] from: dlhawley:home at: 20-Apr-2001 9:49
The Telephone/local below would actually break or at least be
more complicated in Oregon where we have gone to 10 digit dialing.
Some nonesense about too many cell phones and pagers... I think
that it would have made a lot of sense to put them on their own area code(s), but the
PUC didn't.
Previously, you (Andrew Martin) wrote:
> How about adding the telephone number to Rebol? For example:
> Telephone: +64-6-8354110
<<quoted lines omitted: 20>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
David L. Hawley D.L. Hawley and Associates 1.503.274.2242
Software Engineer [David--L--Hawley--computer--org]
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted