Comment by behnamoh

Comment by behnamoh 2 days ago

2 replies

I love the restarts system but the fact that the industry as a whole chose other approaches makes me wonder if there's something the "wisdom of the crowds" knows that I'm not aware of.

> you can literally pause on an exception, rewind, fix your code and continue from where you left off.

Does it only work on source codes or can I distribute a binary and let my users debug the code like this? Should I distribute the 'image' for it to work?

And is the fix temporary (until the program dies) or permanant?

Jtsummers 2 days ago

> I love the restarts system but the fact that the industry as a whole chose other approaches makes me wonder if there's something the "wisdom of the crowds" knows that I'm not aware of.

The restart system is complex, harder to implement, and harder to reason about (it has more "spooky action at a distance", much of it determined at runtime and not compile time).

The "wisdom of the crowds" will generally favor systems that are either:

1. Easier to implement (including sustainment work in the future)

2. Easier to use (or reason about in this case)

Sometimes you get things that are both, but it's often not possible (or feasible) to find or make systems that are both easy to use and easy to implement.

Checked exceptions and explicit error returns are one of those things that happen to provide both (1) and (2) (sort of on 2: often more upfront work, but better reasonability). They're easier to implement for language developers (everything is known at compile time, there is less needed in terms of runtime support especially for explicit error returns), and they're easier to create static tooling for which helps users (programmers). Even without tooling, the explicitness and locality of information makes them more reasonable.

Unchecked exceptions are harder to implement (for instance, the need for handling cleanup as you unwind the stack, which could happen at any point in a function's execution), and they are harder to build static tooling for and harder for programmers to reason about. Common Lisp's conditions and restarts are even harder on all fronts.

This isn't a bad thing, it's a powerful tool. But it means that it won't be mainstream once easier alternatives come along. All the wisdom of the crowds has told us on this is that checked exceptions and explicit error returns are easier. Not that one is better or worse than the other.

cultofmetatron 2 days ago

> makes me wonder if there's something the "wisdom of the crowds" knows that I'm not aware of.

As I alluded to earlier, its really hard to scale a dev team when the language does nothing to keep you on the rails. As an engineer, I hate go for its lack of abstractions and verbosity. As a CTO, I can appreciate that its trying to reduce the friction in making sure all code looks familiar and that any engineer can be rotated into it. TLDR: the things that make common lisp so good for a lone dev are what make it hard for larger projects and most projects nowadays have multiple contributors. I wouldn't start a startup on common lisp today unless you were trying to do something truly novel and your team was all seasoned and experienced devs. throwing a bunch of vibe coding juniors on common lisp is a recipe for disaster while you might make it to a series A using a language like go.

Personally, I love elixir as I think it strikes a really good balance. My team is all older programmers. Our youngest guy is 32 and we have all developed a pretty good intuition for maintaining a descent code base.

> Does it only work on source codes or can I distribute a binary and let my users debug the code like this? Should I distribute the 'image' for it to work?

I wouldn't hand it to the end user but paul grahm famously did cowboy debugging on live servers. A user would cal complaining of a error and paul could go in and patch it in real time while observing the runtime of the system the user was on.

I think it goes without saying that that was a different time and we def can't do that kind of thing today.

> And is the fix temporary (until the program dies) or permanant?

you patch teh code and reload it into your running vm. so its permanent.