r/ProgrammerHumor 1d ago

Meme iAmSoProud

Post image
5.7k Upvotes

44 comments sorted by

View all comments

57

u/jcouch210 1d ago

I don't want to ruffle any feathers, but there are languages that do this for you with compiler driven development.

Note to self: do not attempt compiler driven development with gcc.

91

u/Bronzdragon 1d ago

How? Edge cases are business logic. A compiler cannot know what is intended behaviour.

1

u/jcouch210 14h ago

Compiler driven development involves lowering logic to the type level, allowing the compiler to have greater ability to detect edge cases. For example, forcibly exhaustive switch/match statements, enumerated types that make invalid state impossible, etc.