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

World: r3wp

[!REBOL3]

Kaj
11-Jan-2011
[6922]
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
[6948x2]
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 ...
Ladislav - it was exagerration on my part :-), but I just try to 
explain, that we have imo more important things to care about :-) 
No offense here ....
Ladislav
11-Jan-2011
[6950]
The importance is in the eye of the beholder. If I saw it the way 
you do, I would not have written the code I wrote today.
Kaj
11-Jan-2011
[6951x13]
I am not disrespecting the REBOL function naming convention, I am 
respecting REBOL's founding principle and trying to make you see 
that it means that things are context dependent, instead of black 
and white
Analysing conventions in current naming of standard REBOL functions 
(that is, the practice instead of the documentation about the practice) 
two conventions can be seen in R2 and now three conventions in R3
The simplest, most abstract and thus most flexible convention is 
to use a word as-is, just like in English. As you observed, this 
applies to the math functions, for example, such as SINE
The second convention in R2 is to add the ? qualifier. Most of the 
functions this applies to return a logic value, but some return other 
values, such as LENGTH?
R3 has added a third convention with just a few examples to date, 
such as words-of and body-of
This makes it clear that there is a reason not to use the ? for all 
these cases, because otherwise they could have been WORDS? and BODY?
It seems reasonable to me to assume that R2 only used ? because there 
weren't many cases yet, and this seemed consistent. But with more 
cases now, consistency is being lost, so this may not have been the 
greatest idea
I think the best example of this is TYPE?. It returns the datatype, 
while you might have expected it to return a logic value. But there's 
another function with a more elaborate name, DATATYPE?, that does 
that
In hindsight, I think it would have been better to have DATATYPE? 
be just TYPE? so that it is consistent with the other <type>? functions, 
and to have TYPE? be TYPE-OF
Leaving TYPE free to use as your own word
What irks my language sensibility most is to use ? for non-logic 
values where -of could have been used
Not because "property of?" is a wrong question, but because a REBOL 
program is full of such evaluations. So if you would use ? consistently, 
every expression would be full of question marks, whereas in human 
language it only marks the end of a complete sentence (and the beginning 
in Spanish)
I'd rather have an expression full of -of words, because that resembles 
English more, even though this, too, is too much, as Steeve says
Ladislav
11-Jan-2011
[6964]
just like in English

 - the naming of math function is not just like in English, it is 
 just like in mathematics
Kaj
11-Jan-2011
[6965x2]
Yes, so not consistent according to your black and white interpretation
In many cases when you ask a question in human language, you want 
to make a decision. So I associate a question mark in REBOL with 
control flow, and would thus rather limit the ? qualifier to logic 
values
Ladislav
11-Jan-2011
[6967]
that is you speaking about "inconsistency", no problem for me, exactly 
like it is you reinventing non-existent conventions, like non-logic 
versus logic return values
Kaj
11-Jan-2011
[6968]
You're the one who wants to make the convention black and white, 
not me
Ladislav
11-Jan-2011
[6969]
I do want to respect the convention when possible, and, frankly, 
you cannot do anything about my will in that respect
Ashley
11-Jan-2011
[6970]
The current convention works for me, but I don't think of it in verb/noun 
terms but question/non-question terms.


 length? and none? are both questions, whether they return a logic! 
 or not can be deduced by their name(s) ... ("What is the length?" 
 versus "Is this a none value?")

A question must return a logic, none or scalar value.


The best we can say about non-questions is that they generally "do" 
or change something.
BrianH
11-Jan-2011
[6971]
Ladislav, I added some comments to http://issue.cc/r3/1818- apparently 
the docs hadn't been updated with the *-OF convention.