-
-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
This issue is discussing something to be implemented first-hand on the develop/experimental branch, which is tracked by #7
At first, ReQL syntax feels nice, but after some usage, it starts to freak you out.
Some queries return Cursor<T>, others return List<T>, others just return T.If you're a JS/Python/Ruby developer, it is fine, but in Java it makes you feel lost.
The reason lies on this line:
public <T, P> T run(Connection conn, OptArgs runOpts, Class<P> pojoClass) {In Java, experienced developers orient themselves by the type system. But in this case, there is no type logic at all!
T, the return type, can be P, but can also be Cursor<P>, which makes all code a runtime guessing game of "will it return a cursor, a list or something else?".
I'm opening this issue to ask the community your opinions about this annoying issue, if it should be fixed or not, and if it should, what would you think would be a better syntax?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested