On 8-2-2012 2:36, Timon Gehr wrote:
char[] is handled by Phobos as a range of dchar, ergo it does not have
swappable elements.
I'm surprised that array.reverse does work (using 2.057)
On Wed, 08 Feb 2012 04:30:04 -0500, Jos van Uden user@domain.invalid
wrote:
On 8-2-2012 2:36, Timon Gehr wrote:
char[] is handled by Phobos as a range of dchar, ergo it does not have
swappable elements.
I'm surprised that array.reverse does work (using 2.057)
array.reverse is *not* the
On 02/08/2012 03:56 PM, Steven Schveighoffer wrote:
On Wed, 08 Feb 2012 04:30:04 -0500, Jos van Uden user@domain.invalid
wrote:
On 8-2-2012 2:36, Timon Gehr wrote:
char[] is handled by Phobos as a range of dchar, ergo it does not have
swappable elements.
I'm surprised that array.reverse
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,
On Wed, Feb 08, 2012 at 08:32:32AM -0800, Jonathan M Davis wrote:
[...]
Except that char[] is _not_ an array of characters. It's an array of
code units. There is a _big_ difference. Not even dchar[] is an array
of characters. It's both an array of code units and an array of code
points, but
Jonathan M Davis wrote:
thanks to how unicode works
This does not mean, that the data structure representing a sequence of
letters has to follow exactly the working you cited above. That
data structure must only enable it efficiently. If a requirement for
sequences of letters is, that a
On Wednesday, February 08, 2012 09:35:28 H. S. Teoh wrote:
On Wed, Feb 08, 2012 at 08:32:32AM -0800, Jonathan M Davis wrote:
[...]
Except that char[] is _not_ an array of characters. It's an array of
code units. There is a _big_ difference. Not even dchar[] is an array
of characters.
On Wednesday, February 08, 2012 17:52:17 Manfred Nowak wrote:
Jonathan M Davis wrote:
thanks to how unicode works
This does not mean, that the data structure representing a sequence of
letters has to follow exactly the working you cited above. That
data structure must only enable it
Hi all,
I'm trying to reverse a character array. Why doesn't the following work?
import std.algorithm;
void main() {
char[] array = ['a', 'b', 'c'];
reverse(array);
}
I get:
Error: template std.algorithm.reverse(Range) if
On 02/08/2012 02:29 AM, H. S. Teoh wrote:
Hi all,
I'm trying to reverse a character array. Why doesn't the following work?
import std.algorithm;
void main() {
char[] array = ['a', 'b', 'c'];
reverse(array);
}
I get:
Error: template
On 02/08/2012 02:29 AM, H. S. Teoh wrote:
Hi all,
I'm trying to reverse a character array. Why doesn't the following work?
import std.algorithm;
void main() {
char[] array = ['a', 'b', 'c'];
reverse(array);
}
I get:
Error: template
On Wednesday, February 08, 2012 02:36:23 Timon Gehr wrote:
char[] is handled by Phobos as a range of dchar, ergo it does not have
swappable elements. Apparently there is no template specialisation of
'reverse' that handles narrow strings, you might want to file an
enhancement request.
There
12 matches
Mail list logo