Skip to content

Latest commit

 

History

History
12 lines (12 loc) · 711 Bytes

File metadata and controls

12 lines (12 loc) · 711 Bytes

Let's Make Exceptions Great Again (M.E.G.A.)

Introduction

What is wrong with C++ exceptions?

  1. exceptions are expensive
  • unknown price (space/performance) and behaviour
    • heap allocated
  • ironically, stack unwinding in C++ (a compiled language) is executed by dwarf interpreter
  • also, stack unwinding can allocate memory
  1. exception costs are unpredictable
  2. exceptions prevent compiler from using certain optimizations
  3. unreliable
  4. proposals to change exceptions (Herb's "Deterministic exceptions", Outcome pattern)