Re: Scripting style: Verbs in function names

2016-11-04 Thread J. Landman Gay
On 11/4/16 4:19 PM, mwieder wrote: J. Landman Gay wrote All the "native" LC functions are nouns. Um, no. That's just sematic sugar the xtalk language creates around some functions. So put the date put the target is the same as put date() put target() Ruby allows the same thing, albeit

Re: Scripting style: Verbs in function names

2016-11-04 Thread mwieder
ric form, i.e. you can create your own function and call it either way. - -- Mark Wieder ahsoftw...@gmail.com -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Scripting-style-Verbs-in-function-names-tp4710027p4710089.html Sent from the Revolution - User maili

Re: Scripting style: Verbs in function names

2016-11-04 Thread Bob Sneidar
What is wierd is that we are calling commands and functions as though they were properties. Another layer in the onion. I think all this reveals how truely difficult it is to create an "english like" language, when English (and all languages) are so relative by nature and dependent to some degre

Re: Scripting style: Verbs in function names

2016-11-04 Thread Bob Sneidar
Hmmm... interesting. Well for instance I have some contact functions and commands like addContact, updateContact, deleteContact, saveContact etc. and I use this regularly so getSomething() for my vote. The assumtion otherwise is that the value returned is the something you are trying to get. Wha

Re: Scripting style: Verbs in function names

2016-11-04 Thread Mike Kerner
Do they not teach sentence diagramming to geeks any more? If you can't diagram it, you can't use it in xtalk. That's the rule. Obey. On Fri, Nov 4, 2016 at 8:27 AM, Keith Martin wrote: > On 3 Nov 2016, at 23:00, Devin Asay wrote: > > I think the best function names are the ones that “read” na

Re: Scripting style: Verbs in function names

2016-11-04 Thread Keith Martin
On 3 Nov 2016, at 23:00, Devin Asay wrote: I think the best function names are the ones that “read” naturally in a statement And that, in a nutshell, is one of the beautiful things about the xTalk language(s). Natural readability is important, so wherever this makes sense it, rather than gen

Re: Scripting style: Verbs in function names

2016-11-04 Thread Dave Kilroy
Thanks all, interesting discussion There is another aspect of function/handler naming which is their names in relation to APIs - for example I might have a checkConnectivity() function in an mainstack's stack or card which calls a cgi.checkConnectivity() function in a code library called “cgi”

Re: Scripting style: Verbs in function names

2016-11-04 Thread Monte Goulding
Thanks for taking the time to write such a considered response Mark > > Are these names any better than the ones already used in the library? It is > hard to say - naming preferences are highly subjective! > I like them, the only thing I’m not sure about is the multiple `mime` in each. > Just m

Re: Scripting style: Verbs in function names

2016-11-04 Thread Mark Waddingham
If the goal is to emulate (to some extent) the English-like nature of script in our handler names, then I think it is instructive to look at the syntactic forms employed in the current syntax that exists. I can think of the following general forms: - properties: the X the X of

Re: Scripting style: Verbs in function names

2016-11-03 Thread Monte Goulding
> On 4 Nov. 2016, at 12:07 pm, hh wrote: > >> Monte wrote: >> Peter has asked me to "Please name this function with a verb" > > Perhaps he simply meant: > set property "name" of this function to "a verb"? No I don’t think so. This is common best practice so what’s up for discussion is whether

Re: Scripting style: Verbs in function names

2016-11-03 Thread hh
> Monte wrote: > Peter has asked me to "Please name this function with a verb" Perhaps he simply meant: set property "name" of this function to "a verb"? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, un

Re: Scripting style: Verbs in function names

2016-11-03 Thread Richard Gaskin
Monte Goulding wrote: > In a PR I have open Peter has asked me to `Please name this function > with a verb` and I recognised that in LiveCode this is something I > don’t do out of habit while in other languages it is. Why? Because in > the context the a function is used there is already a verb in

Re: Scripting style: Verbs in function names

2016-11-03 Thread Monte Goulding
> On 4 Nov. 2016, at 10:55 am, Paul Dupuis wrote: > > Of course, just to be contrary, English has lots of grammatical > inconsistencies. So if one of the goals of LiveCode script is to be > "English-like" shouldn't it have a few grammatical inconsistencies too? Well we won’t have any trouble th

Re: Scripting style: Verbs in function names

2016-11-03 Thread Paul Dupuis
Of course, just to be contrary, English has lots of grammatical inconsistencies. So if one of the goals of LiveCode script is to be "English-like" shouldn't it have a few grammatical inconsistencies too? On 11/3/2016 7:43 PM, Monte Goulding wrote: >> On 4 Nov. 2016, at 10:21 am, Phil Davis wrote

Re: Scripting style: Verbs in function names

2016-11-03 Thread Monte Goulding
> On 4 Nov. 2016, at 10:21 am, Phil Davis wrote: > > I like Devin's reasoning on this. One of the great benefits we enjoy in using > LiveCode is the "English-like" syntax. This is one of LC's hallmark features. > As I see it, we should work to preserve it and extend it in our naming of > comm

Re: Scripting style: Verbs in function names

2016-11-03 Thread Phil Davis
I like Devin's reasoning on this. One of the great benefits we enjoy in using LiveCode is the "English-like" syntax. This is one of LC's hallmark features. As I see it, we should work to preserve it and extend it in our naming of commands and functions. My 2 cents' worth - Phil Davis On 11/3

Re: Scripting style: Verbs in function names

2016-11-03 Thread dunbarx
at even a handler is also similarly of this form: doSomething But the way function calls are framed begs for, demands a verb, even if handler calls kind of, ought to, do as well. Craig -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Scripting-styl

Re: Scripting style: Verbs in function names

2016-11-03 Thread Devin Asay
> On Nov 3, 2016, at 4:16 PM, Monte Goulding wrote: > > Hi LiveCoders > > In a PR I have open Peter has asked me to `Please name this function with a > verb` and I recognised that in LiveCode this is something I don’t do out of > habit while in other languages it is. Why? Because in the conte

Re: Scripting style: Verbs in function names

2016-11-03 Thread Paul Dupuis
Monte, You might as well ask: Coke or Pepsi? or Mac or Windows? or iOS or Android? or Burger King or McDonalds or (pick your favorite non-American head to head competing things) :-) And is complex because, for example, I like the looks of "put Something() into container" in my code. However, when

Re: Scripting style: Verbs in function names

2016-11-03 Thread J. Landman Gay
All the "native" LC functions are nouns. The reason is that LC functions can be used with either parentheses or preceded by "the". So we get this: put the date put the selectedChunk put the target If these were verbs: put the getDate put the getSelectedChunk put the getTarget whic

Re: Scripting style: Verbs in function names

2016-11-03 Thread mwieder
tItalicizedText - -- Mark Wieder ahsoftw...@gmail.com -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Scripting-style-Verbs-in-function-names-tp4710027p4710028.html Sent from the Revolution - User mailing list archiv

Scripting style: Verbs in function names

2016-11-03 Thread Monte Goulding
Hi LiveCoders In a PR I have open Peter has asked me to `Please name this function with a verb` and I recognised that in LiveCode this is something I don’t do out of habit while in other languages it is. Why? Because in the context the a function is used there is already a verb in the statement