News for hackers. Stuff that matters.
Re:From Go to Rust: The Two Types of Readable Code by bionsystem on Wednesday February 14, 2024 @04:18PM (#39375541)
f(x,y) -> Clear and straightforward - the mark of practical programming. f x y -> Acceptable in shell scripting, but a bit odd. (f x y) -> Impossibly puzzling. Approach with caution!

Pretty funny. I'm working with maven at the moment so a function call looks more like :

<plugins> <plugin>execute</plugin> <id>function-f</id> <executions> <execution> <cmd>f</cmd> <arguments> <argument>x</argument> <argument>y</argument> </arguments> </execution> </executions> </plugin>

Re:From Go to Rust: The Two Types of Readable Code by Quekid5 on Wednesday February 14, 2024 @05:08PM (#39376257)
> f x y -> Acceptable in shell scripting

Or Haskell (aka: with a good type system). Or even Haskell used for shell scripting[0]. I've used this along with Stack shebang lines to great effect. A 70 line git subcommand script with stronk type checking is amazing. (It's a very workflow-specific script, but the fact that I've never had to debug it because of weird interpolation issues, etc. is amazing.)

[0] https://hackage.haskell.org/package/turtle