Interview with Stroustrup

Jonathan Coupe jonathan@REDACTED
Thu Sep 18 17:36:24 CEST 2003


Luke Gorrie wrote:

> 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 :-)

A friend travelled from the UK to Mexico recently for a genetic engineering
conference. The hotel refused all her credit cards, so the manager had to be
woken in the middle of the night to authorize some sort of sepcial
arrangement. The next day she found that the same thing had happened to all
the other Europeans - my bet is that someone, somewhere had written some
very "pragmatic" code.

- Jonathan








More information about the erlang-questions mailing list