News for hackers. Stuff that matters.
Re:The death of if/else cascades, a lightweight alternative by derefr on Sunday December 06, 2009 @04:03PM (#980161)
What about cases where you basically want the user to specify the condition at runtime, with what amounts to a Turing-complete language for writing those conditions? In the Tivo example, pretend you wanted users to be able to go up to the device and say "only record shows where one of the lexicographical permutations of the length in minutes is a prime number." The only way to avoid it is not to avoid it: to create a user-extension language with its own compiler, and a VM embedded into the program.
Re:The death of if/else cascades, a lightweight alternative by DrJokepu on Sunday December 06, 2009 @07:19PM (#980407)
Oh yes allowing scripting is often an excellent feature, but I wouldn't consider a scripting interface "changing code at runtime". The boundaries of the application and the scripting environment are clearly defined most of the time. Scripting is more like receiving automated control input.

Of course the JIT of the scripting language might have self modifying parts in it but that's not the point.