Re: Style for function calls?
- To: mathgroup at smc.vnet.net
- Subject: [mg97166] Re: Style for function calls?
- From: magma <maderri2 at gmail.com>
- Date: Fri, 6 Mar 2009 05:40:04 -0500 (EST)
- References: <goqpg6$lsb$1@smc.vnet.net>
I have not used ~ very much (if at all) myself, because many times it can be more elegantly replaced by subvalue programming (operator[x_] [y_]), but the @ technique is sometimes quite nice. For example, let's say you have written a long function call with many arguments and then you think you should do some operation on it. You could use the postfix notation of course, but suppose your eye or cursor is near the head of the function call. Instead of trying to find the ending "]" (with your eyes or by triple clicking) it might be faster and more natural to simply insert the new operator with @ in front of the function call, where your mouse/eye already is. This might also make your code easier to read in the future. After all using postfix notation is a bit like reading some long sentences in German or Latin where the main verb is at the very end. Unless you are a native speaker, you might find it a bit awkward. hth