On 2017-12-11 17:48, Mark Wieder via use-livecode wrote:
It *is* a step away from natural-language xtalk syntax though.
I take it the syntactic sugar of offering

"the detailed files of pFolder"

would fall under the dreaded category of synonyms?

No - see http://quality.livecode.com/show_bug.cgi?id=3210

It falls under the 'requires significant work to various parts of parser to make it work without potentially causing horrendous issues now or in the future' category.

In general, it is best for us to avoid introducing / making worse the whole function/property synergy as any function which has a property form reserves the name of the function - i.e. you can no longer use that as a property of an object (whether custom, or engine).

My general feeling is that the english-like syntax *should* be:

  the [detailed] files of folder <folder>

i.e. 'the files' is a property of a pseudo-folder object

However, we don't currently have the parsing infrastructure for that (although I think Ali did some experimental work towards it quite a while ago) - hence why we currently have *just* the function form for files/folders with specified folder.

Warmest Regards,

Mark.

P.S. The problem with function-property duality only occurs when the argument of the function is an arbitrary string - as in this case. The duality is fine if the function acts on a type which is entirely distinct from control id syntax:

put the sin of pString -- OKAY, 'sin' only acts on numbers, not control refs

put the files of pFolder -- NOT OKAY, a folder could have name 'control "foo"'

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
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