Re: Style for function calls?
- To: mathgroup at smc.vnet.net
- Subject: [mg97217] Re: Style for function calls?
- From: Raffy <raffy at mac.com>
- Date: Sun, 8 Mar 2009 05:52:29 -0500 (EST)
- References: <27880366.1236333347943.JavaMail.root@m02> <email@example.com>
I agree with some of the above statements. 1. I never use postfix in any routines. I usually only for testing and debugging code in notebook format. As said above, its useful for doing lazy transformation and works well under the analog of pipes. 2. I never use infix beyond the built in uses. 3. I prefer to use prefix for avoiding trails of end-brackets, however I never prefix to a single value. ie. f[g[h[i]]]] -> f@g@h[i] 4. I try to avoid the use of explicit parentheses. ie. f /@ ( .... ), to me, looks better as: Map[f, ...] 5. Lastly, I am free to break any rule and restructure my code if "order of operation" is not obvious. However, this rarely happens if you stick to the above or similar criterion.