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

I get the debugging experience, as I've already found it pleasant and painless compared to the difficulty of setting debugging environments in other languages. But for the messages first approach and thinness, what's the real world benefit in practice?



You can intercept and modify messages on the fly. This helps a lot if you want to update legacy code, but don't want to break other classes that use the same call. It also allows for modularization more easily. I have a project that receives data from a bunch of sources, so I have a class for each source (this is simplified). To make it much easier to add a new one, which happens pretty regularly, the code that calls the processor checks all the classes in a specific folder for a certain function (`.respond_to?`) and then gets the right one for the data type. This means that to add a new source I have to change 0 lines of legacy code, just drop the new class file in the right place and it works.




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

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

Search: