Skip to content

Comment on Rust's Two Kinds of 'Assert' Make for Better Codeparent

Comments

That is literally what Common Lisp has and GP describes…

https://en.m.wikibooks.org/wiki/Common_Lisp/Advanced_topics/...

It is always fun when people learn some of the things that common lisp has done for a long time.

I realize you could probably build this in lisp, but this (by default) seems to be missing the part about jumping back to where the exception was raised, instead of resuming flow control from where the restart was defined, iiuc.

There is nothing to build, restarts act on the location where the condition was raised. In a conditions system unwinding is a restart, conditions don't unwind before running handlers.

The ability to update a value would make no sense otherwise.

I repeat, what you describe is literally how common-lisp works. Today. And how it has worked for 40 odd years. Also smalltalk.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.