r/Compilers • u/Trave11er3427 • 15d ago
optimistic or pessimistic compiler?
for those that compose and craft compilers, do you find the results better and more satisfying for you if the compiler you work on is permissive/optimistic or strict/pessimistic?
permissive/optimistic here means that the starting point is the compiler assumes the line of code that it is parsing/evaluating is probably ok but needs to pass some checks before translating to the target backend? (this is “the compiler is your friend” approach)
strict/pessimistic here means that the starting point is the compiler assumes the line of code that it is parsing/evaluating has something wrong and its job is to discover that wrong thing, and it is disappointed when the line passes all checks before translating to the target backend? (this is “the compiler is the teacher we’ve all had at one point in our life where they assume you’re going to do something bad as soon as they’re not looking” - and they’re not wrong)
obviously there has to be some balance here, but i’m curious, what has been your experience with these two approaches?
View all comments
Show parent comment
2
u/matthieum 15d ago
I consider myself intelligent. Anecdotes (IQ, relatives, friends, colleagues) all point to me being intelligent.
Doesn't mean I can't trip on my own feet, accidentally omit a word when typing a phrase, or a
!sign when typing a boolean condition.I am intelligent, but I am all too fallible, especially when my damn brain is already thinking about the next thing when I'm still typing the previous one.