r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3]

Kaj
11-Jan-2011
[6899x2]
A noun is a word used to name a person, animal, place, thing, and 
abstract idea. Nouns are usually the first words which small children 
learn. The highlighted words in the following sentences are all nouns:

    Late last *year* our *neighbours* bought a *goat*.
    *Portia* *White* was an *opera* *singer*.

    The *bus* *inspector* looked at all the *passengers*' *passes*.

    According to *Plutarch*, the *library* at *Alexandria* was destroyed 
    in 48 B.C.
    *Philosophy* is of little *comfort* to the *starving*.
According to you, all starred words (no rich text in AltME) should 
get question marks
Ladislav
11-Jan-2011
[6901]
For other people, just to make sure they understand even if they 
don't remember the wording of the http://www.rebol.com/r3/docs/concepts/scripts-style.html#section-10
convention:


- the convention applies *only* to function names, not to the REBOL 
words in general

- when picking a name for a function, any candidate is not a name 
yet, it is just a word/words, and it can be examined, whether it 
is a noun or not
- etc.
Kaj
11-Jan-2011
[6902]
Most REBOL words hold functions, so what's the difference? And with 
all words, it's impossible to tell from the lexical notation if it's 
a function or not
Ladislav
11-Jan-2011
[6903]
The difference is, that when sticking to the convention, it is easier 
to find out, that:


DO is a function, PRINT is a function, GET is a function, LENGTH? 
is a function
Kaj
11-Jan-2011
[6904]
So I ask again, what about the REBOL functions that don't conform 
to this convention?
Ladislav
11-Jan-2011
[6905]
of course, it does not make any trouble to add WORDS-OF convention, 
since it does not introduce any ambiguities
Kaj
11-Jan-2011
[6906]
Using a question mark on LENGTH doesn't tell you that DO, PRINT and 
GET are functions
Ladislav
11-Jan-2011
[6907]
suggested reading: http://www.rebol.com/r3/docs/concepts/scripts-style.html#section-10
Maxim
11-Jan-2011
[6908]
the convention for functions simpy is that:
  -they should (start with) verbs

  -if using a noun, it should have some special char to imply its a 
  function. (i.e. size? vs size)
Ladislav
11-Jan-2011
[6909]
also: http://www.rebol.com/r3/docs/concepts/scripts-style.html#section-11
Maxim
11-Jan-2011
[6910x2]
words of breaks this convetion since it starts with an noun and isn't 
followed by a special char... I think that is the only point Ladislav 
is trying to make !!?!?
oops...    should be:   words-of
Ladislav
11-Jan-2011
[6912x4]
no, I was trying to make the point, that WORDS-OF may well be added 
as an alternative
(to the above doc article)
...since it is missing
...and since it does not introduce any ambiguities when added, as 
far as I am able to find out
Kaj
11-Jan-2011
[6916x4]
You would have a stronger case if you would admit that it is about 
property getters, not about nouns as such
The documentation would make a stronger case if it wouldn't confuse 
nouns and verbs
Some nouns can also be used as verbs.
This is impossible in human language. What it means is that some 
nouns can also be used as function names
Ladislav
11-Jan-2011
[6920]
While I see the WORDS-OF naming convention as coming from the C language, 
I am not a C hater to the extent to refuse it. As some noticed, it 
may even make the source code more human readable as in:

    length-of series

versus

    length? series
Kaj
11-Jan-2011
[6921x2]
By definition, when this situation occurs in human language, we say 
that the word can be used as both a noun and a verb, with different 
grammar and semantics
In human language, that doesn't require a different form for the 
word, but it does trigger a flag in our language sensibility that 
something odd is being said
Ladislav
11-Jan-2011
[6923]
It is funny, that it looks, that people prefer

    length-of series

to the form

    get-length series

which is starting with a verb...
Kaj
11-Jan-2011
[6924]
Because it is declarative
Steeve
11-Jan-2011
[6925]
when "length" is followed by a serie

Why do we need to write "length of serie" , Is that not already implicit 
?
Ladislav
11-Jan-2011
[6926]
I am sorry, Steeve, but I probably do not understand your question
Steeve
11-Jan-2011
[6927]
I just wonder, giving that idiom 
-> length serie
Why do we need to specify:
-> length of serie

Is that not already implicit, that the word "length" applies on the 
"serie"
Maxim
11-Jan-2011
[6928x3]
length serie 


isn't readable.   they are two different sentences, in fact you'd 
need a comma or a semi-colon in english.
length?  implies the whole sentence... what is length of ?
our brain fills in the gap cause its very obvious for any english 
speaker... this might not be the case for non native english speaking 
people though...
Steeve
11-Jan-2011
[6931x2]
I'm ok to add "of" in Rebol as a special transparent word to help 
the reader.
>> of: func [value][:value]
to be able to write such things like:
>> length of serie
but not like a mezz, it must be fast
Maxim
11-Jan-2011
[6933]
the issue is that  'length is the function, not  'of  

and length is not a verb, this is very confusing.
Steeve
11-Jan-2011
[6934]
size is a noun as well a verb
Ladislav
11-Jan-2011
[6935]
Yes, but that is quite funny, since "size" as a verb does not mean 
what the "size?" word is supposed to mean
Maxim
11-Jan-2011
[6936]
steeve, yes which is why adding an ! or ? at the end is an easy to 
make a difference between the noun or the verb.
Kaj
11-Jan-2011
[6937x7]
that is quite funny, since 

size" as a verb does not mean what the "size?" word is supposed to 
mean"
This is what I meant by that the case of the same word being able 
to be either a verb or a noun triggers a flag in one's language sensibility
What Steeve means is that, nonetheless, English has no problem with 
the two cases being the same word, because it can be inferred from 
the context
To "size something up" means "to get the size of it"
To make that explicit, you could use size-up for the verb and size-of 
for the noun
Of course, you could also use <verb>size</verb> and <noun>size</noun>
The point being, that REBOL is based on relative expressions, so 
SIZE is correct to use in all cases, like in human language
Ladislav
11-Jan-2011
[6944]
if you are saying "I do not want to respect the REBOL function naming 
convention" then I don't want to change your mind in that. But, I 
think, that a reasonable naming convention is of advantage, and the 
one Carl wrote looks good enough to me.
Pekr
11-Jan-2011
[6945]
This all should move to advocacy :-)
Ladislav
11-Jan-2011
[6946x2]
Why?
(it discusses the function naming if I am allowed to remind you)
Pekr
11-Jan-2011
[6948]
Because when I got back to home, it feels like arguing :-) i know 
we are discussing consistency here, and I am the first one who always 
screams when something is feeling inconsistent, but - I would 100 
times prefer Carl being back, ending his 2-3 months R3 black-out 
period, instead of caring, if one function is going to be called 
faces-of, or faces?, because in the end the discussion started because 
of that. And even more - whatever we think, will have to be agreed 
by Carl anyway ...