[erlang-questions] Ideas for a new Erlang

Sven-Olof Nystr|m <>
Sat Jun 28 08:45:03 CEST 2008

Darren New writes:
 > 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.

Why don't you show us what the code would look like?

If you want to keep track of outstanding requests, you can do it
without selective receive.

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

I don't think so. In Erlang, there are better ways to solve the
problem you're sketching.

 > 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.

As I said, show us.


More information about the erlang-questions mailing list