"It didn't understand" can't happen
Jump to navigation
Jump to search
It didn't understand can't happen
- Imagine ... You are typing in some code, trying to compile it or just run the script and damn, the compiler or interpreter does not like what you wrote. It does not work, the output message is so intricated you don't understand well why it did not like it. The fact is, it does not run.
- What would you do? Study the language syntax (if you have it) ? Copy the error message on Google? ... Naaa, let's face it, you would just rephrase your last code block trying to use another idiom you are more sure the compiler will like.
- Still there is always that sense of humiliation, why the hell it does not what to do what I say ?
- If you can't fix a specific error and just replace code blocks it means you don't master your programming language. Now ask yourself, how many people really master in full whatever C-like language syntax ? Let me tell you, they are not many. You may have never met one in person.
- In Smalltalk this ugly feeling of will rarely happen, just follow the debugger, inspect the variables, you will find your mistake or you will find a Smalltalk bug (far more improbable).
- In Smalltalk there are no idioms, the language is simple, be the parser, read the code as the computer does, make the AST in your head, it is not so difficult.
- One thing you can't do, be compiler . This for me is off limits as of today Jan-2022.
- But you can also be another thing, be the evaluator, be the objects ! Think like you are a part of the system and see what you, the human Smalltalk would do.
- If you, the human Smalltalk can do it, it, the silicon Smalltalk can do it and must do it. There can't be misunderstanding.