You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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> Trun(Connectionconn, OptArgsrunOpts, 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?
The text was updated successfully, but these errors were encountered:
This issue is discussing something to be implemented first-hand on the
develop/experimental
branch, which is tracked by #7At first, ReQL syntax feels nice, but after some usage, it starts to freak you out.
Some queries return
Cursor<T>
, others returnList<T>
, others just returnT
.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:
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 beP
, but can also beCursor<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?
The text was updated successfully, but these errors were encountered: