:= vs = in some function definitions
- To: mathgroup at smc.vnet.net
- Subject: [mg113234] := vs = in some function definitions
- From: Sam Takoy <sam.takoy at yahoo.com>
- Date: Wed, 20 Oct 2010 04:06:37 -0400 (EDT)
Hi, Have read everything I could find regarding delayed assignment, I'm still not quite sure when to use which. For example, in the definition f[x_] = IdentityMatrix[50].Append[Range[1, 49], x]; could there ever be any reason to use := ? It seems that using := will condemn the function to repeated extra work every time its called. So could there be a situation where the use of ":=" for the above function is recommended? Many thanks in advance, Sam