Condition Systems in an Exceptional Language - Chris Houser
Channel:ClojureTV · Length:33:32 · Published:2015-11-17 · Views:15936
Summary
Chris Houser's Clojure/conj talk on why Clojure's exceptions destroy information as the stack unwinds, unlike Common Lisp's condition system, which can resume from the error site. He surveys the existing libraries that approximate conditions, explains why they don't compose with each other, and considers what a better design would look like.
Why HN recommends it
Clojure commenters cite it as the best overview of condition systems in Clojure and of the libraries that attempt them.
A great overview of the problem and some of the libs is — HN, 2017
Programming language design · Functional programming
Subtitles (excerpt)
good morning everybody how are you we having fun my name take does say Chris Houser but you can all call me ciao sir I'm gonna do this alright so and I'm gonna be talking about condition systems if I can get this thing to work all right this is not good all right we're gonna do it this way okay here's my outline I'm going to talk about a problem and I'm going to go into detail and exaggerate if necessary to make it sound really bad then I'm going to describe a solution and it'll be a great solution you could even call it a silver bullet now I'm gonna after that I'm gonna introduce a library that implements that solution and I'm gonna give it a clever name and then talk about only the good things in the library and because it's me I'm probably never actually gonna release the library so all right that's not that's not my outline my actual outline is I'm gonna talk about some of the options you have when it comes to handling errors and then we're gonna talk about common lisp it's condition system provides a lot of those options for you so you can choose am i speaking odd enough can everybody hear me in the back corners okay okay and then I'm gonna look at some we're gonna show briefly some of the libraries that are already
On Hacker News
There are some libraries for this. A great overview of the problem and some of the libs is [VIDEO] and a good set of corresponding notes at [LINK] — puredanger, 2017-02
True, the CL REPL is more useful than the Clojure REPL, but CL has a 20-30 year head start in development. Plus, Clojure was developed as a hosted language, and runs on .NET, Javascript, JVM, and even Dart (in-progress). Since exceptions are quite deeply integrated into those platforms (as opposed to conditions), it has "bled through" to the Clojure APIs, and, in turn, REPL. Folks have written a … — the-alchemist, 2022-09
You can do that yourself if you care ( [VIDEO] ) but I get what you mean. On the other hand, on a server application a REPL on exception wouldn’t help me. — phyrex, 2018-12
It turns out that it is, in fact, at least mostly possible to implement a condition type system in Clojure. See [VIDEO] I did a little bit of googling for Clojure libraries that do this: [LINK] and [LINK] I don't actually recommend any of these and haven't tried them. In particular I think using a non-standard library for your error handling, which is already probably relatively poorly tested, is… — nialo, 2016-12
The stack unwinding was such a sad thing to me. Reading about CL condition system made me smile widely. You have more data to treat the exception. While reading the abstract, suddenly the word Exception felt absurd. It's rarely an exceptional condition, it's really a parallel planned error checking. Also, being from the Java era, an Exception was mostly a boring way to ensure error checking, whil… — agumonkey, 2016-06
Related videos
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019 · GOTO Conferences · 42:02
- "Simple Made Easy" - Rich Hickey (2011) · Strange Loop Conference · 1:01:38
- "Making Impossible States Impossible" by Richard Feldman · elm-conf · 25:06
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- The Value of Values with Rich Hickey · InfoQ · 31:43
- Why Isn't Functional Programming the Norm? – Richard Feldman · Metosin · 46:09
- Maybe Not - Rich Hickey · ClojureTV · 1:03:28
- Solving Problems the Clojure Way - Rafal Dittwald · Clojure/north · 1:02:26
- Lecture 1A: Overview and Introduction to Lisp · MIT OpenCourseWare · 1:12:55
- Conway's Game Of Life in APL · Dyalog · 7:47
- Lecture 1A | MIT 6.001 Structure and Interpretation, 1986 · MIT OpenCourseWare · 1:12:55
- Crockford on JavaScript - Volume 1: The Early Years · YUI Library · 1:42:08
- Growing a Language, by Guy Steele · Bill Pugh · 53:31
- Effective Programs - 10 Years of Clojure - Rich Hickey · ClojureTV · 1:14:51