[erlang-questions] Ideas for a new Erlang

Darren New <>
Fri Jun 27 21:37:30 CEST 2008


Sven-Olof Nystr|m wrote:
> Since I disagree on point 1, I don't see much reason to discuss your
> other points.

Try looking at it again, and think that you're buffering something 
somewhere other than memory. Say you have ten disk files, and add() 
writes the message to one of the disk files and pop() pulls the message 
from one of the disk files, and Contents is tracking which files have 
messages.

Or say that add() puts the text on the bottom line of the screen, and 
you get a {get,Who} message when the user clicks on the "OK, I've seen 
it" at the top of the screen, like processing fast-food orders or 
something.

Or say that add() queues some processing up on a collection of 
processors (say, mpeg-compressing some video with hardware acceleration) 
and pop() gets the results, making room for another job to run on that 
hardware.

All that would be the same code, with the same constraints needing to be 
solved.

That Erlang has dynamically-sized message buffers doesn't mean that a 
bounded buffer example is nonsensical. It just means you use it for 
something other than what Ada et al use it for.

-- 
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.



More information about the erlang-questions mailing list