Created
January 18, 2025 15:49
-
-
Save RigoLigoRLC/a8bbb01d6254c739a18a5cd898af5e05 to your computer and use it in GitHub Desktop.
New programming language idea: REvamped SHell, resh. Enjoy the best of both shell script and high level programming languages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/resh | |
# This is a Unix shell, what's fun about it? | |
HELLO='Hello,' | |
CURRENT_VERSION=4 | |
# But here's a twist | |
# I know you hate C++ style lambda capture | |
resh [&] { | |
// But now you code in a high level scripting language | |
HELLO += ' World!'; | |
// Now you do all the math inside | |
// Note: type coercion happens :P | |
CURRENT_VERSION = CURRENT_VERSION ** 4; | |
// Modify the stuff in outside world, with beloved string interpolation | |
let export FILENAME = "${HELLO}_${CURRENT_VERSION}"; | |
} | |
// Enjoy the best of both worlds...? | |
curl -o $FILENAME https://example.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment