Elektrine lite

← Feed

@JamesWidman@mastodon.social

Post #1650315

2026-04-17 23:30 UTC

@pfriedma @bsdphk @whyrl I was thinking it might be nice to use a language with Ada's checking features, but i don't know if i can stomach the C++-like exception semantics. The problem has always been that it completely destroys everyone's ability to reason about control flow. It's kinda glaring for a language that otherwise emphasizes the importance of provable correctness. (Contrast with modern languages like Swift, where you're forced to annotate call sites that can possibly throw.)

Replies (1)

  • @JamesWidman@mastodon.social 2026-04-17 23:37

    @pfriedma @bsdphk @whyrl ...and then on top of that, it's going to unwind the stack, and thereby destroy evidence that would be useful in locating the root cause of a bug, in the event of programming mistakes like null dereferences!? https://learn.adacore.com/courses/intro-to-ada/chapters/exceptions.html I really hope there's a way to disable or alter this behavior and make it trap instead, so that the stack is preserved for debugging...? (C++ unwinds the stack too, but (1) generally not on UB, and (2) we have sanitizers for UB.)

    Open ##1650316