Command-Config Syntax Sugar Suggestion

15 views
Skip to first unread message

enobayram

unread,
Dec 8, 2015, 12:50:59 AM12/8/15
to orx-dev
I have a small Command syntax sugar suggestion:

    >SomeSection.SomeKey  Some.Command <AnotherSection.AnotherKey

Here, >SomeSection.SomeKey means that the result should be written to the "SomeKey" key in the "SomeSection" config section. Similarly for the <AnotherSection.AnotherKey on the input side.

To provide further candy, We could say that just >SomeKey means "SomeKey" in the currently pushed section, which, in the case of a timeline track, means the object's section.

iar...@orx-project.org

unread,
Dec 8, 2015, 1:32:13 AM12/8/15
to orx...@googlegroups.com
I have a small Command syntax sugar suggestion:

    >SomeSection.SomeKey  Some.Command <AnotherSection.AnotherKey

Here, >SomeSection.SomeKey means that the result should be written to the "SomeKey" key in the "SomeSection" config section. Similarly for the <AnotherSection.AnotherKey on the input side.

I find the syntax confusing as for me > and < really mean push and pop. This also means there should be a symmetry between both calls, which isn't true anymore when one uses dedicated storage (many reads from a single write).

Lastly, the <section.key conflict with the use of popping as part of concatenation. Here's a trivial example as I can't think of better at the moment:
> log _suffix
> log prefix
log <<

This will concatenate prefix and _suffix into prefix_suffix.

There's already a suggestion made for direct config storage access in the command enhancement thread. Would that work for you?

Enis BAYRAMOĞLU

unread,
Dec 8, 2015, 1:36:58 AM12/8/15
to orx...@googlegroups.com
Oh, I think I've missed that point, I can't find that actually.

--
You received this message because you are subscribed to the Google Groups "orx-dev" group.
To post to this group, send email to orx...@googlegroups.com.
Visit this group at http://groups.google.com/group/orx-dev.

iar...@orx-project.org

unread,
Dec 8, 2015, 1:45:15 AM12/8/15
to orx...@googlegroups.com
I think you're looking for the points 2 & 3 here: https://groups.google.com/forum/#!topic/orx-dev/6AIaPg54bpQ

Enis BAYRAMOĞLU

unread,
Dec 8, 2015, 1:48:51 AM12/8/15
to orx...@googlegroups.com
Ah great! I've apparently missed the points about config, or maybe just forgotten. This syntax is much better.
Reply all
Reply to author
Forward
0 new messages