lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, 18 Apr 2010 22:00:45 -0700
Mark Hamburg <mark@grubmah.com> wrote:

> On Apr 18, 2010, at 10:22 AM, spir ☣ wrote:
> 
> > I'm presently thinking at something maybe a bit similar (not for a Lua variant, rather a custom language). It has 2 aspects:
> > * Extend Lua-like "funcname {...}" & "funcname '...'" to any argument, and make it standard (and only) func call syntax.
> > * Identifiers can be made of any non-reserved chars.
> > 
> > It appears to be a bit problematic because of possible ambiguity; especially the case of no arg at all is annoying. So, I ended up using '!' meaning request for execution, eg:
> >    obj.doSomething arg!
> >    obj.doSomething!
> >    x : obj.makeSomething arg!
> >    x : obj.makeSomething!
> > (This also gives for free a distinction between denotation of the method itself & execution:
> >    x : obj.makeSomething	<-- 'x' is bound to the method
> > )
> 
> I get tempted by these sort of things on occasion, but the I realize that ! is only one fewer characters than (). The downside to () is that I actually tend to put spaces inside, so that's two more characters and they have to be balanced properly. On the other hand, I don't even want to think about balancing !s.

Yo, but reducing typing is not my point. Rather having --instead of a parenthesized parameter set-- one ordinary piece piece of data, written normally, and simply put aside the call it completes for form a whole message. So, there are two kinds of messages:
* attribute lookup
* method call ('!')
(And by the way, these map to the 2 kinds of simple statements: command=method call and result return, since there a query resulot is simply put there like in Lisp.)
 
> Mark
> 




________________________________

vit esse estrany ☣

spir.wikidot.com