Hacker News new | past | comments | ask | show | jobs | submit login

Filesystem watching is only part of the equation though. Live reload has been available for the web and various other platforms for a long time, but the traditional approach to live reloading does not preserve application state.

These new hot reload implementation allows your app to be reloaded with your new changes without affecting the state of the application, and is not practical unless your application has been developed with a focus on functional techniques and careful management of application state.

This probably doesn't sound like a significant difference, but in practice, it is a huge boost to productivity, especially in a non-trivial app where reloading the entire app and then reproducing the app state manually with every file change can become quite tedious.




That's why Common Lisp / CLOS has functionality like

  * CHANGE-CLASS (change the class of an object to a different class),
  * update-instance-for-different-class (updating the object after a class change, one can provide methods which will be lazily called when needed),
  * update-instance-for-redefined-class (updating the object after redefining a class, one can provide methods which will be lazily called when needed),
  * LOAD (load source or machine code),
  * EVAL (eval expressions)
  * COMPILE (compile code in memory to memory), ...
One then always develops with a live application. Classes and objects can be updated in-place...


Which can be really cool, but has its downsides:

Hey cool, I can change these classes live!

Let's solve this tricky problem by changing the class at runtime. Cool, it works, now on to the next problem.

2 years later...

What's causing this super-weird bug? It's like the code isn't doing what it says at all.

1 week of debugging and head-banging later...

Oooh, something got screwed up in that runtime class change code. Fixed.

2 years later, repeat...


Is that something you've experienced?


Not directly, mostly because I haven't done that much work in any language where you can do that. But I have had that kind of experience when trying to figure out what Ruby code is actually being run somewhere. I may be heading that way with C#, with the occasional overuse of dynamic and reflection.


Sounds neat, I do love a rapid feedback loop, although I may have done similar with a debugger and the reload built-in come to think of it.

In the types of apps I think we're talking about, typically most state is in the database and not much is going on in the client.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: