expression and statements in Java



Would it be good to allow me to write either:

<cond> ? <code1> : <code2>

or

if(<cond>) then <code1> else <code2>

without forcing me to commit to which context this piece of code will
appear: i.e., expression or statement.

Normally you will choose one or the other, but when you generate code,
sometimes you just don't know.

Now I miss functional lang.

Suggestions? thanks,

.



Relevant Pages

  • Re: expression and statements in Java
    ... > without forcing me to commit to which context this piece of code will ... 'Faith without judgement merely degrades the spirit divine.' ...
    (comp.lang.java.programmer)
  • SAYC question
    ... This is in the context of BBO random pickup bridge. ... According to the SAYC book, a 2/1 response, although not game forcing, ... In the MSC, they argued that 2N _was_ forcing, but again, the question ...
    (rec.games.bridge)
  • Re: thread problem...
    ... What makes you think your contributions are so vital to Keith that he should commit to memory the context of every thread in which you post an article? ...
    (comp.lang.c)
  • anybody know this error on the index server
    ... Index propagation to search server <FE1 (IP 12.2.2.2.2>failed to commit. ... Context: http://myshi.com/ Application, Portal_Content Catalog ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Ctrl+C
    ... Clipboard instead of bringing up a context menu forcing you to then ... I'm pretty sure it's supposed to work the same way in Vista.) ...
    (microsoft.public.windows.vista.general)