Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Concurrent Programming in Java

    Concurrent Programming in Java

    Doug Lea · 1999

    ProgrammingSystems & OS
    Open LibraryAmazon
    Stats for nerds
    1recommend
    5mentions
    5people
    2008–2023years
    20% recommend80% neutral

    Mentions per year

    200820102012201420162018202020222023

    What Hacker News says

    1. CatDancerMar 2008
      Concurrent Programming in Java by Doug Lea.

      (Though do your actual programming in a more powerful language such as MzScheme if you have any choice).

      thread
    2. sa46Jan 2023
      When do you find reusing a promise useful? I know one canonical example is a loadable hashmap as in Concurrent Programming in Java, but I was curious if you knew of other examples.
      thread
    3. elamjeJun 2020
      I was super excited to see this paper released. I've spent time with Python, Java, C#, Javascript and limited time on C and Rust. Clojure was the largest paradigm shifter by a large margin.

      Having done concurrent programming in Java, and even implemented some concurrency primitives like semaphores, Clojure was incredible to use. For those that don't know, Clojure uses immutable data structures that mitigate concurrency issues. If you are curious how that's even practical, I highly recommend the paper and also reading about Persistent Data Structures. They reuse shared data, similar to how Git only tracks the delta's between commits, rather than multiple, full copies of the file.

      On top of that, you up reducing lines of code by 60-70% of traditional Java or C#.

      thread
    4. JachApr 2019
      Heh, I wasn't even thinking of that one as the relevant reference, though it's valid. I was thinking of "Concurrent Programming in Java" as it comes from the horse's mouth, but that one is also close to 400 pages.

      I don't even try to think about concurrent designs too much at work and sometimes feel guilty about it. Occasionally I'll use or suggest someone use a CompleteableFuture, but there is so much code and irrelevant detail compared to Clojure's "wrap body in (future), done". On the other hand some more junior devs have expressed lack of interest in studying concurrency at all since "we don't really work on concurrent or distributed systems", at which point I have to point out that as a company we serve a giant web application with API entry points from multiple bits of hardware with clients all over making concurrent requests... The road is long.

      thread
    5. kaelukaJul 2014
      I wish that none were written this way: Using a sample size of 4, the paper proposes some layer model. Already the first language (erlang) does not correspond to this model, yet the model will later be concluded to be the way to go: "A surprising result is that the four resultinglanguages have a common structure (comment: no, they don't). [...] I postulate that this common structure will be part of one possible definitive programming language".

      Then we have four conclusions:

      1. the notion of declarative programming is a the 'core' of programming languages

      2. it will also stay there

      3. it is concluded that message passing "seems to be the correct default for general purpose concurrent programming" (my emphasis)

      @1: what's the 'core'? Without any useful definition, this is a meaningless statement.

      @2: aha! The core seems to change over time. OK, I rephrase my last question: what's the 'core' today?

      @3: First, it's a weak conclusion that something 'seems' to be the case. But, ignoring the odd usage of the word 'correct', how does the author support this conclusion? It seems like the author thinks that presenting a couple examples for your proposed solution (message passing) allows to conclude that a competing solution (shared memory programming) is worse. I fail to see evidence for that. Yeah, programming with locks is harder than programming with actors. But it's also more expressive, so the comparison is unfair. If you want to compare erlang to, say, java, you need to compare it to programming with higher level data structures (queues, actors, ...).

      btw, this one's a gem: "Declarative concurrency is a deterministic form of concurrency that is much simpler to program with than the shared-state concurrency used in mainstream languages such as Java [18]" -- if you look at [18], it doesn't support the simplicity claim; it's a reference to Doug Lea's "Concurrent Programming in Java". The simplicity claim remains a claim. That may be sloppy writing. Or not.

      thread

    Related

    Cover of Java Concurrency in Practice
    2009–2026

    Java Concurrency in Practice

    Brian Goetz
    53 recommend · 82
    Cover of The architecture of concurrent programs
    2021–2025

    The architecture of concurrent programs

    Per Brinch Hansen
    2 recommend · 5
    Cover of Parallel And Concurrent Programming In Haskell
    2013–2025

    Parallel And Concurrent Programming In Haskell

    Simon Marlow
    24 recommend · 34
    Cover of Effective Java
    2007–2026

    Effective Java

    Joshua Bloch
    172 recommend · 287
    Cover of Concurrent programming on Windows
    2010–2021

    Concurrent programming on Windows

    Joe Duffy
    4 recommend · 4
    Cover of Concurrent Programming in ML
    2015–2023

    Concurrent Programming in ML

    John H. Reppy
    2 recommend · 5
    Cover of Communicating sequential processes
    2009–2026

    Communicating sequential processes

    C. A. R. Hoare
    25 recommend · 73
    Cover of Seven Concurrency Models In Seven Weeks
    2014–2025

    Seven Concurrency Models In Seven Weeks

    Paul Butcher
    10 recommend · 15