this post was submitted on 17 May 2025
445 points (98.5% liked)

Programmer Humor

23312 readers
1154 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] hades@lemm.ee 0 points 5 hours ago (1 children)

I agree, compiled languages prevent large classes of errors, including invoking functions with wrong parameters. However, whether or not you define calling max() with no arguments to be an error or not is unrelated to your language being compiled or interpreted. You could define max() to be -inf in C++ if you wanted, even though the language allows you to prevent invocations of max() with no arguments altogether.

[โ€“] bss03@infosec.pub 1 points 42 minutes ago

The run time still has to assign a semantics to it, even if that semantics is a fatal error. In a compiled language, you can prevent the run time from having to assign any semantics by eliminating the error condition at compile time.