mirror of
https://github.com/ruuda/rcl.git
synced 2025-12-23 04:47:19 +00:00
Maybe I am nitpicking here, but I think this will benefit readability. It's cool that you can have let bindings anywhere, but it doesn't necessarily make things more readable when you cram everything on one line.
19 lines
417 B
Text
19 lines
417 B
Text
// This is still okay, one statement.
|
|
let okay = let x = 1; 1 + x;
|
|
|
|
// This, despite fitting on one line, wraps because it has two statements.
|
|
let wrap = let x = 1; let y = 2; 1 + x + y;
|
|
|
|
okay + wrap
|
|
|
|
# output:
|
|
// This is still okay, one statement.
|
|
let okay = let x = 1; 1 + x;
|
|
|
|
// This, despite fitting on one line, wraps because it has two statements.
|
|
let wrap =
|
|
let x = 1;
|
|
let y = 2;
|
|
1 + x + y;
|
|
|
|
okay + wrap
|