JEP 330: Launch Single-File Source-Code Programs

Jonathan Gibbons jonathan.gibbons at
Mon Mar 26 22:32:38 UTC 2018


The problem is that the first line of a shebang file is effectively read 

It is initially read by the operating system, as part of the operation 
of the shebang feature. That happens before the executable named in the 
first line is even invoked, and is therefore out of the control of any 
executable that might be named.

Then, the executable is invoked giving the shebang file as an argument. 
The executable will read the file, including the first line. Since we 
have no ability to mandate any specific format, the best we can do is to 
go with what the operating system provides.

-- Jon

On 03/26/2018 02:55 PM, Remi Forax wrote:
> "All subsequent bytes are read with the default platform character encoding that is in effect."
> should we not mandate UTF8 instead ?
> Rémi
> ----- Mail original -----
>> De: "mark reinhold" <mark.reinhold at>
>> À: "jonathan gibbons" <jonathan.gibbons at>
>> Cc: "compiler-dev" <compiler-dev at>
>> Envoyé: Lundi 26 Mars 2018 23:41:36
>> Objet: JEP 330: Launch Single-File Source-Code Programs
>> New JEP Candidate:
>> - Mark

More information about the compiler-dev mailing list