yes - what we have now is verbose. i did consider a shorthand like you
suggested, but opted against it initially because i didn't want to
introduce new first class citizenry to the GraphTraversalSource. Of course,
at the time i didn't realize that we would be handling this with a strategy
as the vehicle for implementation. g.with() is a bit more compelling to me
knowing that it's just shorthand for a withStrategies(OptionStrategy) call.
I guess we should use with() rather than withOption() which would make it
analogous to the with() modulator on GraphTraversal.



On Mon, Oct 8, 2018 at 9:56 AM [email protected] <[email protected]>
wrote:

> Hi,
>
> I recently saw the new OptionsStrategy feature added in
> https://issues.apache.org/jira/browse/TINKERPOP-2053, and was wondering
> it it would be possible to add dedicated support for this at the traversal
> level.
>
> Using a strategy is fine, and I can see that it fits well with the
> existing infrastructure. However from the user point of view it is
> extremely verbose:
>
> g.withStrategies(OptionsStrategy.build().with("specialLimit",
> 10000).withOption("specialLimit2", 1000).create()).V();
>
> vs something like:
>
> g.with("specialLimit", 10000).with("specialLimit2", 1000).V()
>
> Would it be possible to introduce something like the above syntax to
> implicitly add and configure the OptionsStrategy?
>
> I think it would make this new feature much more compelling. I can see
> lots of uses for supplying traversal level options going forward.
>
> Many thanks,
>
> Bryn
>
>
>
>

Reply via email to