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)
  • [git pull] Please pull powerpc.git merge branch
    ... There is one commit there from Hugh Dickins that fixes a build ... Fix possible scheduling of a context to multiple SPEs ... powerpc/spufs: Fix race for a free SPU ...
    (Linux-Kernel)
  • [patch 32/45] KVM guest: do not batch pte updates from interrupt context
    ... Commit b8bcfe997e4 made paravirt pte updates synchronous in interrupt ... so a pte update from interrupt context during a lazy mmu ...
    (Linux-Kernel)
  • 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: BUG: scheduling while atomic
    ... PPP will call pty_write from BH context which eventually leads ... We should also revert the other commit that ... I reverted the commit and applied the patch on-top of 2.6.31-rc2. ...
    (Linux-Kernel)