4 ms·
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.
by bionsystem 3y ago
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>
- Quekid5 3y ago> 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 https://hackage.haskell.org/package/turtle