From cc42d8fbbc91adbc885bdd73b413a1bfe3f87e15 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 18 Nov 2021 11:25:32 -0500 Subject: [PATCH] publish UB blog post --- .../ub-good-idea.md => _posts/2021-11-18-ub-good-idea.md} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename personal/{_drafts/ub-good-idea.md => _posts/2021-11-18-ub-good-idea.md} (97%) diff --git a/personal/_drafts/ub-good-idea.md b/personal/_posts/2021-11-18-ub-good-idea.md similarity index 97% rename from personal/_drafts/ub-good-idea.md rename to personal/_posts/2021-11-18-ub-good-idea.md index 1539cde..1f374b2 100644 --- a/personal/_drafts/ub-good-idea.md +++ b/personal/_posts/2021-11-18-ub-good-idea.md @@ -3,9 +3,9 @@ title: "Undefined Behavior deserves a better reputation" categories: rust research --- -*This is a cross-post of an [article that I wrote for the SIGPLAN blog](https://blog.sigplan.org).* +*This is a cross-post of an [article that I wrote for the SIGPLAN blog](https://blog.sigplan.org/2021/11/18/undefined-behavior-deserves-a-better-reputation/).* -"Undefined Behavior" often has a bad reputation. People often see it as an excuse compiler writers use to break code, or an excuse by a lazy language designer to not complete the specification and properly define all this behavior. +"Undefined Behavior" often has a bad reputation. People see it as an excuse compiler writers use to break code, or an excuse by a lazy language designer to not complete the specification and properly define all this behavior. But what, really, is Undefined Behavior, and is it as bad as its reputation? In this blog post, I will look at this topic from a PL perspective, and argue that Undefined Behavior (or UB for short) is a valuable tool in a language designer's toolbox, and that it can be used responsibly to convey more of the programmer's insight about their code to the compiler with the goal of enabling more optimizations. I will also explain why I spent a significant amount of time adding *more* UB to Rust. -- 2.30.2