[
https://issues.apache.org/jira/browse/TINKERPOP3-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652834#comment-14652834
]
Matt Frantz commented on TINKERPOP3-761:
----------------------------------------
The use of strings as variable names with definitions given using your proposed
{{with}} clauses seems the most general. The default interpretation of those
strings would be as a symbol name. String literals would be {{with('x',
constant('x'))}} or by using a {{StringLiteral}} subclass of {{String}}, e.g.
{{StringLiteral.of('x')}}.
It seems that {{select...with}} is a bit more scalable than {{select...by}} for
a large number of items. Maintaining the parallel list of {{by}} clauses
incorrectly can lead to subtle bugs.
I wonder if it also solves TINKERPOP3-655 because you could say something like
{{with('x', variable)}}. You would build variables that would be used as
placeholders as described there.
> Some basic mathematical functions / steps
> -----------------------------------------
>
> Key: TINKERPOP3-761
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-761
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.0.0-incubating
> Reporter: Daniel Kuppitz
> Assignee: Marko A. Rodriguez
>
> Every once in a while I wish to have steps for some basic mathematical
> operations ({{add()}}, {{sub()}}, {{mul()}}, {{div()}}). Since {{sub(num)}}
> is the same as {{add(-num)}} and {{div(num)}} is the same as {{mul(1/num)}},
> we would only need two new step implementations.
> Oh, and then there's also {{mod()}}, thus 3 new step implementations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)