This is a single archived entry from Stefan Tilkov’s blog. For more up-to-date content, check out my author page at INNOQ, which has more information about me and also contains a list of published talks, podcasts, and articles. Or you can check out the full archive.

A New Generation of Features for Programming Languages

Stefan Tilkov,

Dare Obasanjo has an interesting post about programming language features, especially with regards to . This does indeed seem rather smart:

Take the following class definition as an example:
public class Buffer {
public async Put(string s);
public string Get() & Put(string s) { return s; }
}
In the Buffer class a call to the Put() method blocks until a corresponding call to a Get() method is made. Once this happens the parameters to the Put() method are treated as local variable declarations in the Get() method and then the code block runs. Similarly a call to a Get() method blocks until a corresponding Put() method is called. This assumes that each corresponding Put() call has a corresponding Get() call and vice versa.
On January 10, 2005 2:24 PM, Ashley McNeile said:

FYI: Dare Obasanjo has changed (I assume corrected) the description of the way this class works.

On January 10, 2005 10:41 PM, Stefan Tilkov said:

Thanks for pointing it out …