World: r3wp
[!REBOL3 GUI]
older newer | first last |
Andreas 24-Dec-2010 [4717] | +1 for FACES-OF |
PeterWood 24-Dec-2010 [4718x3] | +1 for FACES-OF |
Oldes: there are a number of REBOL functions with a ? that return something other than boolean - length? and type? immediately spring to mind! | |
I can see that they would be more meaningful if they were called length-of and type-of though. | |
Kaj 24-Dec-2010 [4721] | They're also exceptions to the general rule, because the word without ? is used too much as a variable or another function, as Anton says |
Gregg 24-Dec-2010 [4722] | +1 for FACES-OF |
Claude 25-Dec-2010 [4723] | Merry Christmas |
Ladislav 25-Dec-2010 [4724] | Re: "They're also exceptions to the general rule" - the general rule *is* to use the question mark for such functions, though. The FACES-OF "convention" is not a REBOL convention. In fact, it is more like a C convention. |
Pekr 25-Dec-2010 [4725x2] | Ladislav: and what about words-of, values-of? Those did not exist in R2, but were added to R3. Faces-of fits that naming scheme .... |
having consistent naming conventions across the board is imo always a tough call. Naturally I can understand, why you have selected short "faces", and adding question mark ... | |
Andreas 25-Dec-2010 [4727x2] | Even in R2 we had maximum-of and minimum-of. |
In R3 A110 we have 8 "-of" words and 16 non-logic! "?" words (+4 "?" console convenience words). | |
BrianH 25-Dec-2010 [4729] | I prefer the *-of naming, even if they might get complaints about not being reflectors (most of the -of words are reflectors). |
Andreas 25-Dec-2010 [4730] | Quite a few of the 16 existing "?" non-logic! words fall in the backwards-compatibility category (e.g. exists? index? info? length? modified? offset? size? type?). |
BrianH 25-Dec-2010 [4731x3] | Some of the ? words won't be able to be changed because of backwards compatibility (this is a #667 situation, not a #666). |
We could add new words in addition to the old, but not get rid of the old. At least that's the policy (so far). | |
EXISTS? is used in conditional expressions, so it is not completely non-logic. I am not sold on the ? equals logic rule though; to me, ? always meant question. | |
Anton 25-Dec-2010 [4734x2] | EXISTS? originally returned only logic, didn't it? So its evolution into more than just logic should also be considered a backwards compatibility legacy situation, I think. |
I don't mind '?' being use to indicate a question, but I think the "-of" words more accurately reflect what information is being extracted FACES? - it's like "huh?" - it's vague, someone's secret language. (Maximum-of and minimum-of were poorly named; I wanted them changed to 'at-maximum(-of)' etc since they return the series at the index.) | |
Steeve 25-Dec-2010 [4736] | Just a warning. Don't be seduced by the Dark Side of the Force. It's what I dislike the most in all actual popular languages. I mean , the bad habit to outrageously extend the names of variables and method. The exact meaning of variables and methods is given by the context of the use case. That's why they don't need to be over explicit. And If you have any doubt, you can use HELP, at least in Rebol. |
BrianH 25-Dec-2010 [4737] | Agreed, Steeve, I'm OK with giving a +1 to the magic words method. |
Steeve 25-Dec-2010 [4738] | In human languages, words are almost all polysemous. The true meanings of words is given by the context. Carl was able to expel all the horrors syntactic found in other languages. So we can almost read code like a human language. Do not lose this goal, if you can. |
Robert 25-Dec-2010 [4739] | +1 FACES? What would a logic mean here? That there are faces? Well, it's a GUI thing... if than maybe FACE? could be ambigous. |
Steeve 25-Dec-2010 [4740] | Btw, I vote to keep FACES?. When i see ? in a word's name, i know it may be a boolean or a calculated value (actually a function). If the context is not clear enough, I invoke HELP. Actually, I would have choose the name CHILDS. It's more polymorphic, and it can apply on faces or gobs. |
Anton 25-Dec-2010 [4741x2] | Ah damn, you exposed my true nature as a Dark Side human resources manager. |
sorry, recruitment officer. | |
Steeve 25-Dec-2010 [4743] | :- |
Anton 25-Dec-2010 [4744] | put that light-saber away, you're overreacting! |
Steeve 25-Dec-2010 [4745] | my mistake, I cut my own smiley with my lightsaber :-) |
Anton 25-Dec-2010 [4746x2] | pyromaniac vandal. |
Returning (with some effort) to serious consideration of your argument; I'm in agreement (how could I not), but I would like to point out that it's a bit like a slippery slide argument: if I accept to add just a few more characters (? -> -of) then I'm on the road to creating the API with the most unwieldy extra long function names as found in other languages (without the utility of Rebol contexts at their disposal). | |
Steeve 25-Dec-2010 [4748] | It was just a warning. The Devil is in the details. -of could be the devil seed and give birth to abominations, like: get-faces-of-a-face But I am conforted now ;-) |
Anton 25-Dec-2010 [4749] | <Aha..! My evil plan worked..> |
Izkata 25-Dec-2010 [4750x2] | Just throwing something out here (as I'm not actively involved in R3 and mostly lurk): I see "-of" as a "what" or "what are" type of question, while "?" more like "what is" (and all the rest) type of question. (does it) exist? (what is the) length? (what is the) size? (when was it) modified? vs (what are the) faces-of (what are the) values-of Then of course, minimum-of and maximum-of break this idea: (what is the) minimum-of But this works just as well IMO: (what is the) minimum? So looking at that, I'd consider the "?" or "-of" question to not so much be based on logic values, but whether it returns a single value, or a list of values. |
So, +1 for FACES-OF here | |
Steeve 25-Dec-2010 [4752] | What informs about a single value or a list is the use of plural in the name. |
Izkata 25-Dec-2010 [4753] | I've always seen that as incidental, not the meaning, but I guess I can see how it works. |
Ladislav 25-Dec-2010 [4754x2] | FACES? : FACES-OF = 5:6 currently, if I count it correctly |
Correcting my overlooking: FACES? : FACES-OF = 5:9 | |
Steeve 25-Dec-2010 [4756] | Not the topic, but this function does a strange control. |
Ladislav 25-Dec-2010 [4757] | what do you mean? |
Steeve 25-Dec-2010 [4758x2] | In the code, why does it need to check if the contained gobs have a consistent data/face/gob ? |
It should be consistent at first, no ? | |
Ladislav 25-Dec-2010 [4760x3] | Anyway, for me, REBOL standard is still SUFFIX?, not SUFFIX-OF, since it is documented as the proper style, as well as used in the majority of cases, like Andreas noted. |
In the code, why does it need to check if the contained gobs have a consistent data/face/gob ? - because we had problems with text-faces, which contain a face-less gob, i.e. a gob for which gob/data is a face, which does not have face/data = gob. This caused a cycle for faceless gobs. | |
I do not know who introduced those faceless gobs, does somebody know? | |
nve 25-Dec-2010 [4763] | I have two questions about R3 GUI : * do you have a demo script ? * do you have the same design has shown by Carl in march http://www.rebol.com/r3/docs/gui/guide.html ? |
Ladislav 25-Dec-2010 [4764] | demos are available, just see above (Henrik mentioned how you get them) |
Steeve 25-Dec-2010 [4765] | Ladislav, actually I don't see what you said in this function. I only see that a gob and its gob/data/gob must be the same, which is rather curious |
Ladislav 25-Dec-2010 [4766] | The design has been enhanced, the new doc is almost ready, will be made available on Tuesday, I think. |
older newer | first last |