Dart should be pragmatic, intuitive, etc. I wonder why top-level main () does not set exitcode if int is returned?
I know you can install it through dart:io.exitCode=or use dart:io.exit().
Question: why did the language developers decide to abandon such a popular agreement
#!/path/to/dart --checked
int main() {
int myExitCode = 5;
return myExitCode;
}
It returns 0 (as described in the documentation ), but in the command-line world this is just plain stupid. It does not even warn you (compiler check mode, dartanalyzer). Script just silently return 0. Is there any justification behind this?
UPDATE:
offer error: https://code.google.com/p/dart/issues/detail?id=21639