How to reverse char[]?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Feb 8 07:39:44 PST 2012


On Wed, Feb 08, 2012 at 09:56:17AM -0500, Steven Schveighoffer wrote:
[...]
> D will continue to trip over itself and fall into newbies until it
> makes a decision to make strings not also be arrays.
[...]

I disagree. D will continue to trip over itself until it treats all
arrays equally, that is, if reverse() works on ubyte[], then it should
also work on char[]. There's nothing wrong with treating a string as an
array. After all, "string" means "string of characters", i.e., an array.


T

-- 
Change is inevitable, except from a vending machine.


More information about the Digitalmars-d-learn mailing list