Mark

> On 13 Oct 2015, at 01:58, Mark Waddingham <m...@livecode.com> wrote:
> 
> On 2015-10-12 19:46, Richard Gaskin wrote:
>> I've never seen question marks in handler names in any xTalk I've ever
>> used, so I figured perhaps it might be something specific to Builder.
> 
> It's a standard convention in some languages (Scheme springs to mind) to 
> indicate a 'predicate' - a function which returns true or false.
> 
> I've seem some LiveCode Script libraries in the past use it - although not 
> very many.

Again, I am influenced by Rebol. Most of its functions which return true or 
false end with a ?. Some which return data such as length? also end in a ?. 
These latter are the cause of regular discussion in the community as to being 
renamed with -of at the end. Personally, I prefer length? over length-of (or 
lengthOf in LiveCode’s case). 
> 
>> If allowable, is it desirable?  I suppose it's a matter of taste if it
>> doesn't break anything, but given how uncommon it is I'd wager an API
>> for others to use could benefit from conventions developers might
>> anticipate.
> 
> Well the identifier token in LiveCode Script has always been very forgiving. 
> However, in that does lie a problem - it restricts what operators could be 
> added in the future (which is fine as long as the goal of the language is to 
> avoid as many 'symbols' as possible).
> 
> To be fair '?' poses less of a problem in this regard than '.' - in terms of 
> limiting future options that have been discussed at length in the past ;)

I was surprised to read this as I started using this convention when one of the 
LiveCode team commented on somebody’s code that used the same convention and 
said “some people in the office have started using it”. Of course, I can no 
longer find the comment.  If you think it is an unwise convention to use to 
avoid name clashes, I will adopt another one. Any suggestions as to a good 
approach/

> Certainly, we (at LiveCode) only use handler names using alphanumeric 
> characters and '_’.

See above.

Kind regards

Peter


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to