Interview with Stroustrup

Luke Gorrie luke@REDACTED
Thu Sep 18 12:09:53 CEST 2003

Richard Carlsson <richardc@REDACTED> writes:

> On Thu, 18 Sep 2003, Peter-Henry Mander wrote:
> > It's curious to read that Bjarn is, from an Erlang point of view at
> > least, trying to reinvent the wheel wrt distributed computing.
> >
> > Having pretty much dropped C++ in favour of Erlang due to the vast
> > simplification of code for most of my work, I find this mildly amusing.
> Well, it's a terrible interview for sure, but that particular part juat
> sounds like he is implementing the Java RMI thing in C++. I don't think
> this kind of guy would even appreciate a laguage like Erlang - he'd
> probably feel that it's like cheating somehow.

But cheating is quite popular in distributed-OO circles. Here's an
excerpt from a very popular book called "The Pragmatic Programmer":

  We once worked on a project that required that a certain body of
  Java code run both locally on a server machine and remotely on a
  client machine. The alternatives for distributing classes this way
  were RMI and CORBA. If a class were made remotely accessible using
  RMI, every call to a remote method in that class could potentially
  throw an exception, which means that a naive implementation would
  require us to handle the exception whenever our remote classes were
  used. Using RMI here is clearly not orthogonal: code calling our
  remote classes should not have to be aware of their locations. The
  alternative - using CORBA - did not impose that restriction: we
  could write code that was unaware of our classes' locations.

Of course, in both cases it _will_ throw an exception when
communications are down. The CORBA binding just makes it easier to
ignore this by not declaring to the compiler that a communications
error can happen and must be handled. So with CORBA you can be
Pragmatic and write simple code that works just fine provided nothing
fails :-)

Of course, making the compiler check that you have acknowledged the
exceptional cases is far from solving the problems of distributed
computing, but the RMI guys did understand the issues very well:


More information about the erlang-questions mailing list