Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

February 2004
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29
Jan  Mar

Dynamically changing running Lisp code #3

Wednesday, February 25, 2004

The "Use Perl" site has a post by "ziggy" in which he questions the value of being able to dynamically change running Lisp code. Here are some excerpts (with some of my comments thrown in):

"First, it's nice to work with a long running system, know you've got everything working and leave it alone when it works. Everything is in one place, including the test scripts. That development model works for some people, but it never worked for me. I'm a dyed-in-the-wool C programmer, and I'm used to lots of small programs running, with the odd server performing some task specific function. I don't expect every program I write to have a full development environment, along with multiuser connectivity so that approximately anyone can log into the system and make modifications. But that's just me."
First of all, it's important to make a distinction between a language feature/capability and good security practices. Just because Lisp provides you with the ability to dynamically change running code, does not mean that you should enable that capability in every application that you deliver. Nor should your security be set up to provide access to the system so that "approximately anyone can log into the system and make modifications". Hey, but that's just me ;-)
"Second, these Lisp-based systems tend to be written by very small teams of very talented programmers. They like the fact that Lisp environments give them all the tools they need to operate at light speed. At the same time, this kind of solution feels fundementally unscalable. This is not the kind of project I'd want to use with dozens of programmers, or programmers with widely varying levels of expertise. Allowing anyone (on the development team) unfettered access to the entire running project feels like an invitation to crash the system in horrible, almost irrecoverable ways. And always at the worst possible moment, of course."
Many Lisp-based systems are written by very small teams of very talented programmers. But this does not mean that Lisp is not suitable for larger development teams. However, allowing "anyone (on the development team) unfettered access to the entire running project" is not something that would be allowed on any well-managed development project (regardless of the programming language used or the size of the development team).
"And I think that's why I'm most uncomfortable working with system images. Not only is your source locked in, but enabling runtime patches to a live system just feels dangerous."
I can think of a lot of scenarios where having that capability would be considered an asset: However, to the point ziggy was trying to make, say you do work in a shop where the production code is locked down. Even then, if your language gives you the ability to dynamically change code during the development cycle, think how much more productive you can be as a developer working within the development code base. Your unit of work no longer becomes a source member, it becomes a function, or a class or a method, or an s-expression. Your development experience is no longer code, compile, test, debug, iterate. Instead, the process becomes more holistic - coding, testing, debugging are all the same thing. Very Zen-like,eh? ;-)

emacs Copyright © 2004 by Bill Clementson