Periods as parts of rebol words?
[1/13] from: tim:johnsons-web at: 10-May-2002 8:22
Hello All:
I'm well acquainted with RT's recommendation on using hyphens
in 'words. And since rebol syntax is case-insensitive, it makes
perfect sense.
But I hate hyphens and underscores. I just don't like that reach.
A period(.) is so much easier to use. I have used periods in
rebol words and I haven't encountered any problems thus far.
Any comments?
This is a "help me before I hurt myself question"
thanks.in.advance......
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com
[2/13] from: carl:cybercraft at: 11-May-2002 10:33
On 11-May-02, Tim Johnson wrote:
> Hello All:
> I'm well acquainted with RT's recommendation on using hyphens
<<quoted lines omitted: 6>>
> This is a "help me before I hurt myself question"
> thanks.in.advance......
Hi Tim,
I doubt there's any technical reason why you couldn't do so, but given
that hyphens are used in every third default REBOL word, your scripts
will end up a mish-mash of both styles, won't they?
Also, hyphens are easier to notice than a period in some fonts, so
they're less likely to be mistaken for a space.
As to typing them, well I'm a lousy typist anyway so it doesn't make
a lot of difference to me either way. (; And I hit comers instead of
periods quite often as it is...
--
Carl Read
[3/13] from: greggirwin:mindspring at: 10-May-2002 18:21
Hi Tim,
<< A period(.) is so much easier to use. I have used periods in
rebol words and I haven't encountered any problems thus far. >>
Per the docs:
The end of a word is indicated by a space, a line break, or one of the
following
characters: [](){}":;/
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.
Dot notation isn't found in many natural languages I know of (not counting
phonetic breakdowns which don't use the period :) while hyphenated words are
a normal form, at least in English. Just my 2c.
--Gregg
[4/13] from: ryanc:iesco-dms at: 10-May-2002 17:09
Tim,
After your all done coding just run this...
--------
rebol []
script: read file: request-file/only
forall script [
all [
script/1 = #"."
script/2 <> #"^""
script/2 <> #"{"
script/2 <> #" "
script/2 <> #"."
script/1: #"-"
]
]
write file head script
--------
Not the "right" way, but it was particularly easy. --Ryan
PS: And yes, periods are totally allowable in words.
Tim Johnson wrote:
> Hello All:
> I'm well acquainted with RT's recommendation on using hyphens
<<quoted lines omitted: 14>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Note: When sending me email directly, always make sure to include my
name
[5/13] from: tim:johnsons-web at: 10-May-2002 18:07
* Gregg Irwin <[greggirwin--mindspring--com]> [020510 16:51]:
> Hi Tim,
> << A period(.) is so much easier to use. I have used periods in
<<quoted lines omitted: 3>>
> following
> characters: [](){}":;/
Hello Greg et al..
> 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'm not sure if I find "reading" the dot seperators as easy as typing
them, to be perfectly frank...
> Dot notation isn't found in many natural languages I know of (not counting
> phonetic breakdowns which don't use the period :) while hyphenated words are
> a normal form, at least in English. Just my 2c.
And what languages use forward slashes?
Retorical question really, hyphens are an easier read, and I will
probably stick with them.
Now to try to figure out what Ryan is getting at :-)
Thanks all!
-tim- [Tim Penniston-Pitcher-Johnson]
1.907.745.5555
programmer/surveyor/cook/honey-doer
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com
[6/13] from: rishioswal:yaho:o at: 10-May-2002 18:55
just switch to dvorak keymap like me. The "-" is as
easy to access as the "."
:p
rishi
--- Gregg Irwin <[greggirwin--mindspring--com]> wrote:
[7/13] from: carl:cybercraft at: 11-May-2002 17:47
On 11-May-02, Tim Johnson wrote:
> And what languages use forward slashes?
English? ...
http://www.google.com/search?hl=en&q=s%2Fhe+his%2Fher
--
Carl Read
[8/13] from: ethanak:interclub:pl at: 11-May-2002 11:51
On May 11 at 17:47 Carl Read wrote:
> On 11-May-02, Tim Johnson wrote:
>
> > And what languages use forward slashes?
>
> English? ...
>
> http://www.google.com/search?hl=en&q=s%2Fhe+his%2Fher
Polish? ...
http://www.google.com/search/q=Pan%2FPani&hl=en
--
Namari=EB!
ethanak
[9/13] 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 ]
[10/13] from: greggirwin:mindspring at: 11-May-2002 10:28
Hi Tim,
<< And what languages use forward slashes? >>
English. They're used for alternatives. Refinements may not be a perfect
semantic match, but they're in the right ballpark I think.
--Gregg
[11/13] from: greggirwin:mindspring at: 11-May-2002 11:15
Hi Joel,
<<
> > 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:
>>
Let me see if I can clarify my point a bit.
<<
* 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.
>>
I didn't say REBOL was intended for non-programmers, or that any resemblance
to natural language in any way endowed people not inclined to study the
craft with the ability to write code. That's what dialects are for. :)
<<
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.
>>
Hmmm. I guess I like sugar coating. OTTOMH, I might say a programming
language could be considered good for humans based on the number of
non-programmers that are able to use it successfully.
My justification for this is that, even though the holy grail of 'not
requiring a computer programmer to program a computer' is an ideal we may
never achieve completely, you have to admit that a lot of non-programmers
are writing programs that do useful stuff these days, generally in
sugar-coated languages.
<<
* 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 think it *is* significant (and I disagree with the argument that "it's got
other problems so this won't make any difference"). The syntax is very
important and is a separate issue from the semantics and behavior of a
language. That said, I'm not saying that my view is the "right" way to see
things for the example under discussion, just that it's my view. As you
said, pick a style that you're comfortable with and that won't confuse the
target audience.
If there are standards in place, it's generally a good idea to follow them
(assuming they make a modicum of sense). If you take a different path, have
a reason.
<<
Of course, if we're going to take this resemblance to natural
language seriously...
>>
I obviously created some confusion with my post in this regard. REBOL is,
indeed, an artificial language. I'm not suggesting that it should strive to
emulate natural language so much as it should strive *not* to emulate other
artifical languages. ;)
--Gregg
[12/13] from: joel:neely:fedex at: 11-May-2002 21:59
Hi, Gregg,
Let me clarify too, lest my "enthusiasm" appear to overpower my
common sense (or my manners... ;-)
Gregg Irwin wrote:
> Hmmm. I guess I like sugar coating.
>
I think it was Alan Perlis who said "Syntactical sugar causes
cancer of the semicolon!"
;-)
> OTTOMH, I might say a programming language could be considered
> good for humans based on the number of non-programmers that are
> able to use it successfully.
>
> My justification for this is that, even though the holy grail
> of 'not requiring a computer programmer to program a computer'
> is an ideal we may never achieve completely, ...
>
I don't even regard it as an ideal. The lack of professionalism
in the programming field is one of the major factors behind the
so-called "software crisis" that has been with us for the past
25 years or so. The tendency in some management circles to try
to "de-skill" as many jobs as possible, so that they can staff
their organizations with low-cost entry-level employees rather
than recognizing the real value of the high-skill experienced
employees is another.
I'm *not* suggesting that there be a proficiency exam required
before an individual be allowed to buy a personal computer! It
should be perfectly OK for a Dad and his kids to build their own
treehouse or playhouse in the back yard. However, they shouldn't
imagine that having done so qualifies them to start their own
construction company or work as journeyman carpenters.
> ... you have to admit that a lot of non-programmers are writing
> programs that do useful stuff these days, generally in
> sugar-coated languages.
>
Such as? I'm really not sure what you're referring to here. If
you could give an example or two I'd appreciate it.
> I think it *is* significant (and I disagree with the argument
> that "it's got other problems so this won't make any difference").
>
I just meant that in this sense: I think we'll get more mileage
out of addressing those areas that really give beginners difficulty
in learning the language, as compared to stylistic issues that each
programmer can choose for his/her own code without binding those
judgement call on everybody else.
> I obviously created some confusion with my post in this regard.
> REBOL is, indeed, an artificial language. I'm not suggesting that
> it should strive to emulate natural language so much as it should
> strive *not* to emulate other artifical languages. ;)
>
There are at least some features of other contemporary programming
languages that are there precisely because they have been shown to
have value. (We shouldn't stop using "+" for addition just because
other programming languages do so.) When other languages contain
ideas that have been shown to be of value to real programmers who
work on real projects, there's something to be said for asking,
Does REBOL have anything to address this? If not, why can't it
use tried-and-true ideas?
I guess I just tend to be more interested in whether REBOL is
internally coherent than in whether it resembles (or refuses to
resemble) other languages. If I wanted to use a language that was
different just for the sake of being different, I'd use INTERCAL.
;-)
-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 ]
[13/13] from: greggirwin:mindspring at: 12-May-2002 21:53
Hi Joel,
<< I think it was Alan Perlis who said "Syntactical sugar causes
cancer of the semicolon!" >>
I *have* to file that one away! That's great.
<< I don't even regard it as an ideal. The lack of professionalism
in the programming field is one of the major factors behind the
so-called "software crisis" that has been with us for the past
25 years or so. >>
I agree whole-heartedly. I don't regard it as an ideal, though you're
probably right in that many people do. I think it is a holy grail that falls
deeply in the realms of "be careful what you wish for..." :)
<<
> ... you have to admit that a lot of non-programmers are writing
> programs that do useful stuff these days, generally in
> sugar-coated languages.
Such as? I'm really not sure what you're referring to here. If
you could give an example or two I'd appreciate it.
>>
Well, there are undoubtedly thousands of in-house apps, built by people who
just keep hacking away at them until they work, never understanding why, or
what's still not working that they don't know about. Fault-ridden as they
might be, someone built them to solve a problem they had, and they do that
to at least some extent. I've seen a number of these, and I'm sure you have
too, perhaps cringing at the sight of them. :)
Another general example would be the hundreds, if not thousands, of
shareware apps (mainly written in Visual Basic if we're talking about
Windows). Need to track your bowling scores? Do you design hi-fi speakers?
Too many recipes in your recipe box? A PIM, that's what you need! :)
<< I think we'll get more mileage
out of addressing those areas that really give beginners difficulty
in learning the language, as compared to stylistic issues that each
programmer can choose for his/her own code without binding those
judgement call on everybody else. >>
Agreed.
<< There are at least some features of other contemporary programming
languages that are there precisely because they have been shown to
have value. (We shouldn't stop using "+" for addition just because
other programming languages do so.) >>
I guess sometimes it becomes a question of origins. The usage of +
originated in mathematics. Now, whether mathematics is an artificial
language...let's not go there. :)
<< When other languages contain
ideas that have been shown to be of value to real programmers who
work on real projects, there's something to be said for asking,
Does REBOL have anything to address this? If not, why can't it
use tried-and-true ideas?
>>
Yes, but with caution - as I'm sure you'd agree. I'd also still distinguish
between the "idea" and the "implementation", and whether something belongs
*in* REBOL, or is made *with* REBOL.
--Gregg
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted