jdk7-relnotes

Discussion in 'Java' started by Stefan Ram, Jul 28, 2011.

  1. Stefan Ram

    Stefan Ram Guest

    1. Advertising

  2. Stefan Ram

    markspace Guest

    markspace, Jul 28, 2011
    #2
    1. Advertising

  3. Stefan Ram

    Stefan Ram Guest

    markspace <-@.> writes:
    >"The following example, which is valid in Java SE 7 and later,
    >eliminates the duplicated code:
    >catch (IOException|SQLException ex)


    And we already had the »&« for types as in

    class Alpha< T extends Beta & Gamma, S extends Delta & Epsilon > ...

    . So now, somebody should come up with a general
    theory of conjunction and disjunction types. ;-)

    For example, one then might use (for suitable types)

    catch( S|T ex ) ...

    after the above class head, which can be though of as

    catch( Beta&Gamma|Delta&Epsilon ex ) ...
     
    Stefan Ram, Jul 28, 2011
    #3
  4. On 28/07/2011 10:17 AM, Stefan Ram wrote:
    > http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html
    >
    > http://download.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html


    Saves me a lot of if-else typing in a few situations. Feels "wrong"
    somehow; like somehow, somewhere, C purists are crying. :)

    > http://download.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html


    Hallelujah!

    > http://download.oracle.com/javase/7/docs/technotes/guides/language/catch-multiple.html


    A very irritating minor annoyance is dead... Finally (pun intended). ;-)

    The nio2 library is kind of interesting too.
     
    Travers Naran, Jul 29, 2011
    #4
  5. Stefan Ram

    Ross Guest

    I'm looking forward to trying out the shaped and translucent windows.
     
    Ross, Jul 29, 2011
    #5
  6. On Thu, 28 Jul 2011 21:54:21 -0700, Travers Naran <>
    wrote:

    >On 28/07/2011 10:17 AM, Stefan Ram wrote:
    >> http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html
    >>
    >> http://download.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html

    >
    >Saves me a lot of if-else typing in a few situations. Feels "wrong"
    >somehow; like somehow, somewhere, C purists are crying. :)


    Someday, switch may be as powerful as COBOL's evaluate. I really
    have been spoiled by xBASE's do case statement. It is so useful to be
    able to use full expressions for cases.

    [snip]

    Sincerelyk,

    Gene Wirchenko
     
    Gene Wirchenko, Jul 29, 2011
    #6
  7. Stefan Ram

    lewbloch Guest

    Travers Naran wrote:
    >> <http://download.oracle.com/javase/7/docs/technotes/guides/language/tr...>

    >
    > Hallelujah!


    +1

    I have always found it odd that this pattern is called "Resource
    Acquisition is Initialization" ("RAII").
    <http://en.wikipedia.org/wiki/Resource_acquisition_is_initialization>

    To me it's always been about release in the process of destruction /
    deallocation / descoping. (Which one depends on the programming
    language.) So I call the pattern "Resource Release in
    Deallocation" ("RRID").

    --
    Lew
     
    lewbloch, Jul 31, 2011
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Ram
    Replies:
    1
    Views:
    399
    Digger
    Sep 13, 2010
Loading...

Share This Page