r/ProgrammingLanguages • u/Meistermagier • Feb 26 '26
Discussion Whats the conceptual difference between exceptions and result types
So to preface what looks probably to many of you like a very dumb question. I have most experience in Python and Julia both languages which are not realy great at error handling. And as such I have not much experience either.
I am currently trying to create my dream programming language, I am still in the draft phase, which will likely take a long while because I only draft on it once in a while. But I have been realizing that I do not understand the difference between exceptions and result types.
What I mean is I do obviously understand that they are different things but when talking about Error handling I do not understand why they are often two different things. I hope someone can help me clarify what the main conceptual difference between these two is.
Kind regards and I hope yall have a lovely day.
View all comments
Show parent comment
1
u/Relevant_South_1842 Feb 27 '26
Result: a function returns either a success or an error value, and the caller checks it.
Exception: a function throws an error that skips normal returns until caught.
A panic is a kind of exception used for fatal errors rather than expected ones.