digitalmars.D.learn - Does immutable(char)[] have any advantage over const(char)[] for
- Trass3r (3/3) Jul 28 2009 I currently almost always use const(char)[] for function parameters to
- Steven Schveighoffer (5/8) Jul 28 2009 The inability to use pure functions on those arguments. Although, I'm n...
I currently almost always use const(char)[] for function parameters to make it possible to also pass char[] strings to the function. Are there any disadvantages like optimization issues?
Jul 28 2009
On Tue, 28 Jul 2009 12:40:43 -0400, Trass3r <mrmocool gmx.de> wrote:I currently almost always use const(char)[] for function parameters to make it possible to also pass char[] strings to the function. Are there any disadvantages like optimization issues?The inability to use pure functions on those arguments. Although, I'm not sure where the threading model is going, this might be an old requirement, since only shared data would arbitrarily change during a function call. -Steve
Jul 28 2009