phax / jcodemodel

A heavily extended fork of the com.sun.codemodel (from 2013/09)
Other
93 stars 34 forks source link

Ternary operator #3

Closed sviperll closed 10 years ago

sviperll commented 10 years ago

There is no ternary operator in codemodel, like

return a != null ? a : b;

If-statements are too heavyweight sometimes.

phax commented 10 years ago

I'm on vacation and will look at your requests in a week. In the meantime I think JOp.cond is what you are looking for... Hth Philip

On 5. Mai 2014 14:43:21 MESZ, Victor Nazarov notifications@github.com wrote:

There is no ternary operator in codemodel, like

return a != null ? a : b;

If-statements are too heavyweight sometimes.


Reply to this email directly or view it on GitHub: https://github.com/phax/jcodemodel/issues/3

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. Ich bitte Tippfehler zu ignorieren.:-)

sviperll commented 10 years ago

Should we provide cond-method through JExpr-facade?

phax commented 10 years ago

We do :)