Make the python line not read weird

This commit is contained in:
Micah 2025-01-02 15:02:08 -08:00
parent 4e7912ac9a
commit 1ed0a10b3d
No known key found for this signature in database

View file

@ -20,7 +20,7 @@ A global `eprint` would be added to the global environment. It would have the sa
- JavaScript has `console.log` as an equivalent to `print` and `console.error` as an equivalent to `eprint`.
- Rust has `println!` and `eprintln!` macros that perform equivalently to `print` and the proposed `eprint`
- Python has `print` designed around this: `print(...)` prints to `stdout` and `print(..., file=sys.stderr)` prints to `stderr`
- Python has `print` designed around this passing stream handles: `print(...)` prints to `stdout` and `print(..., file=sys.stderr)` prints to `stderr`
- C has `fprintf` that works similiar to Python's `print`: `printf(stdout, ...)` and `printf(stderr, ...)`
These are just examples. Based on further research on this that it seems roughly split between functions that accept a stream handle to write in (like C or Python) and those that use globals (like JavaScript or Rust). Given Luau currently has no concept of stream handles and `print` already exists, it seems more reasonable to propose the latter.