James G. Sack (jim) wrote:
Gus Wirth wrote:
Tracy R Reed wrote:
Andrew Lentvorski wrote:
Functional progrmming doesn't need a cheerleader.  It needs a problem
to which it is an actual solution.
It seems Erlang was the right choice for Ericsson's phone switches.
And for jabberd. I think Lisp was the right choice for emacs. And as
the number of cores grow in our cpu's I think we will find many more
problems to which functional programming is an actual solution. Can
you do hot swapping of code in any non-functional language? The
paralellism just seems to fall out nicely when using a side-effect
free language as well.

Hot swapped code? Sure, it's trivial. Here's a snippet from FreePascal:

MyObject.SomeProcedure := @SomeOtherProcedure;

And you can do this in running code? Does the running code re-translate
the source when it sees a change?

It's done in running code. But it has to have been compiled somewhere already and in most cases it resides somewhere in the executable unless it's dynamically linked in from a shared object (a file, some_collection.so). So for example, lets say I have a routine that sorts by English language standards (case doesn't matter) and another where it does matter (C). Then somewhere the user can choose:

if WantCase then
  MyObject.SortProc := CSort
else
  MyObject.SortProc := NormSort;

The rest of the program is oblivious to which procedure is actually used, you only have to call MyObject.SortProc

Maybe I'm misinterpreting hot swap (or you are?).

I think Tracy should give us the definition. We might both be looking at it the wrong way.

Gus

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to