For example, :load <script>.scala currently triggers an error in the scala REPL, but not when the same file is run with scala <script>.scala or ./<script>.scala. That seems a bit silly, when the shebang could simply be treated as a comment.
It would be a great convenience if the scalac compiler and scala REPL treated shebangs (#!/usr/bin/env scala) on the first line of a scala file as a comment.
Use cases:
- Flexibly convert between script-style and compile-style code
- Better first-time experience for Unix coders
- Better Windows support for Unix-style code