Re: std.string will get the boot

2010-02-02 Thread Clemens
Lionello Lunesu Wrote: > On 31-1-2010 16:34, Simen kjaeraas wrote: > > Lionello Lunesu wrote: > > > >> I miss typedef. I think this is exactly what typedef was intended > >> for. Perhaps we can reintroduce it as a 'short hand' for such a > >> struct? > > > > struct Typedef( T ) { > > T payloa

Re: std.string will get the boot

2010-02-01 Thread Lionello Lunesu
On 31-1-2010 16:34, Simen kjaeraas wrote: > Lionello Lunesu wrote: > >> I miss typedef. I think this is exactly what typedef was intended >> for. Perhaps we can reintroduce it as a 'short hand' for such a >> struct? > > struct Typedef( T ) { > T payload; > alias payload this; > } > > Usage:

Re: std.string will get the boot

2010-01-31 Thread Simen kjaeraas
On Sun, 31 Jan 2010 15:09:28 +0100, Denis Koroskin <2kor...@gmail.com> wrote: On Sun, 31 Jan 2010 01:30:41 +0300, Simen kjaeraas wrote: Andrei Alexandrescu wrote: bearophile wrote: I can't remember the bit size of wchar and dchar. So names like char, char16 and char32 can be better..

Re: std.string will get the boot

2010-01-31 Thread Denis Koroskin
On Sun, 31 Jan 2010 11:34:03 +0300, Simen kjaeraas wrote: Lionello Lunesu wrote: I miss typedef. I think this is exactly what typedef was intended for. Perhaps we can reintroduce it as a 'short hand' for such a struct? struct Typedef( T ) { T payload; alias payload this; } Usage:

Re: std.string will get the boot

2010-01-31 Thread Denis Koroskin
On Sun, 31 Jan 2010 01:30:41 +0300, Simen kjaeraas wrote: Andrei Alexandrescu wrote: bearophile wrote: I can't remember the bit size of wchar and dchar. So names like char, char16 and char32 can be better... I think it's a tad late for that. So adding aliases to object.d is not possi

Re: std.string will get the boot

2010-01-31 Thread Simen kjaeraas
Lionello Lunesu wrote: I miss typedef. I think this is exactly what typedef was intended for. Perhaps we can reintroduce it as a 'short hand' for such a struct? struct Typedef( T ) { T payload; alias payload this; } Usage: alias Typedef!( int ) myInt; Is this what you want? By the wa

Re: std.string will get the boot

2010-01-31 Thread Michel Fortin
On 2010-01-30 22:06:06 -0500, Lionello Lunesu said: On 30-1-2010 1:59, Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Currently arrays of characters count as random-access ranges, which is not true for arrays of char and wchar. I plan to make std.range aware of that and on

Re: std.string will get the boot

2010-01-30 Thread Lionello Lunesu
On 30-1-2010 1:59, Andrei Alexandrescu wrote: > bearophile wrote: >> Andrei Alexandrescu: >>> Currently arrays of characters count as random-access ranges, which >>> is not true for arrays of char and wchar. I plan to make std.range >>> aware of that and only characterize char[] and wchar[] (and th

Re: std.string will get the boot

2010-01-30 Thread Andrei Alexandrescu
Simen kjaeraas wrote: Andrei Alexandrescu wrote: bearophile wrote: I can't remember the bit size of wchar and dchar. So names like char, char16 and char32 can be better... I think it's a tad late for that. So adding aliases to object.d is not possible this late in the process? I'm not sur

Re: std.string will get the boot

2010-01-30 Thread Simen kjaeraas
Andrei Alexandrescu wrote: bearophile wrote: I can't remember the bit size of wchar and dchar. So names like char, char16 and char32 can be better... I think it's a tad late for that. So adding aliases to object.d is not possible this late in the process? I'm not sure I want that to happe

Re: std.string will get the boot

2010-01-29 Thread Andrei Alexandrescu
Robert Jacques wrote: On Fri, 29 Jan 2010 15:18:14 -0500, Andrei Alexandrescu wrote: Lutger wrote: On 01/29/2010 06:36 PM, Andrei Alexandrescu wrote: ... One problem I foresee is the growth of std.algorithm. It already has many things in it, and I fear that some user who just wants to trim

Re: std.string will get the boot

2010-01-29 Thread Robert Jacques
On Fri, 29 Jan 2010 15:18:14 -0500, Andrei Alexandrescu wrote: Lutger wrote: On 01/29/2010 06:36 PM, Andrei Alexandrescu wrote: ... One problem I foresee is the growth of std.algorithm. It already has many things in it, and I fear that some user who just wants to trim a string may find it i

Re: std.string will get the boot

2010-01-29 Thread Jonathan M Davis
dsimcha wrote: > == Quote from Jacob Carlborg (d...@me.com)'s article >> Perhaps it's time to start adding more packages than just the std. Make >> std.algorithm a package and try to split it into several modules. > > Please, no. I **HATE** fine-grained imports like Tango has. I don't want > to

Re: std.string will get the boot

2010-01-29 Thread Andrei Alexandrescu
Ali Çehreli wrote: D is great that it supports three separate Unicode encodings in the language, but encodings are at a lower level of abstraction than "letters". I am not sure what data is used for toUniUpper and toUniLower in std.uni, but they can't work correctly without alphabet information

Re: std.string will get the boot

2010-01-29 Thread Ali Çehreli
Jacob Carlborg wrote: > On 1/29/10 22:18, Ali Çehreli wrote: >> Jacob Carlborg wrote: >> >> > I would keep std.string for string specific functions and perhaps >> > publicly import std.algorithm. For exmaple functions like: tolower, >> icmp >> > and toStringz. >> >> I've been thinking about cha

Re: std.string will get the boot

2010-01-29 Thread Jacob Carlborg
On 1/29/10 22:18, Ali Çehreli wrote: Jacob Carlborg wrote: > I would keep std.string for string specific functions and perhaps > publicly import std.algorithm. For exmaple functions like: tolower, icmp > and toStringz. I've been thinking about characters lately and have realized that tolower

Re: std.string will get the boot

2010-01-29 Thread bearophile
Andrei Alexandrescu: > // in client code > // get everything tagged with "string" > import std.algorithm : @tag(string); A next step is to allow to import all names with a specified tag, even if such names are inside more than one text file (the compiler can create a json txt file to speed up t

Re: std.string will get the boot

2010-01-29 Thread dsimcha
== Quote from Jacob Carlborg (d...@me.com)'s article > Perhaps it's time to start adding more packages than just the std. Make > std.algorithm a package and try to split it into several modules. Please, no. I **HATE** fine-grained imports like Tango has. I don't want to write tons of boilerplate

Re: std.string will get the boot

2010-01-29 Thread Andrei Alexandrescu
Ali Çehreli wrote: Jacob Carlborg wrote: > I would keep std.string for string specific functions and perhaps > publicly import std.algorithm. For exmaple functions like: tolower, icmp > and toStringz. I've been thinking about characters lately and have realized that tolower, toupper, icmp,

Re: std.string will get the boot

2010-01-29 Thread Andrei Alexandrescu
Lutger wrote: On 01/29/2010 09:43 PM, bearophile wrote: Andrei Alexandrescu: I think the idea of tags is awesome, particularly because it doesn't require one to divide items in disjoint sets. I'll think some more of it. A hierarchical D/Python-like module system isn't the only way to organi

Re: std.string will get the boot

2010-01-29 Thread Ali Çehreli
Jacob Carlborg wrote: > I would keep std.string for string specific functions and perhaps > publicly import std.algorithm. For exmaple functions like: tolower, icmp > and toStringz. I've been thinking about characters lately and have realized that tolower, toupper, icmp, and friends should not

Re: std.string will get the boot

2010-01-29 Thread Lutger
On 01/29/2010 09:43 PM, bearophile wrote: Andrei Alexandrescu: I think the idea of tags is awesome, particularly because it doesn't require one to divide items in disjoint sets. I'll think some more of it. A hierarchical D/Python-like module system isn't the only way to organize blocks of cod

Re: std.string will get the boot

2010-01-29 Thread bearophile
Andrei Alexandrescu: > I think the idea of tags is awesome, particularly because it doesn't > require one to divide items in disjoint sets. I'll think some more of it. A hierarchical D/Python-like module system isn't the only way to organize blocks of code. Both future Windows file system and Go

Re: std.string will get the boot

2010-01-29 Thread Lutger
On 01/29/2010 09:18 PM, Andrei Alexandrescu wrote: Lutger wrote: On 01/29/2010 06:36 PM, Andrei Alexandrescu wrote: ... One problem I foresee is the growth of std.algorithm. It already has many things in it, and I fear that some user who just wants to trim a string may find it intimidating to b

Re: std.string will get the boot

2010-01-29 Thread Andrei Alexandrescu
Lutger wrote: On 01/29/2010 06:36 PM, Andrei Alexandrescu wrote: ... One problem I foresee is the growth of std.algorithm. It already has many things in it, and I fear that some user who just wants to trim a string may find it intimidating to browse through all that documentation. I wonder how w

Re: std.string will get the boot

2010-01-29 Thread Lutger
On 01/29/2010 09:13 PM, Lutger wrote: http://www.naturaldocs.org/documenting/reference.html#Example_Class sorry, wrong anchor: http://www.naturaldocs.org/documenting/reference.html#Summaries

Re: std.string will get the boot

2010-01-29 Thread Lutger
On 01/29/2010 06:36 PM, Andrei Alexandrescu wrote: ... One problem I foresee is the growth of std.algorithm. It already has many things in it, and I fear that some user who just wants to trim a string may find it intimidating to browse through all that documentation. I wonder how we could break s

Re: std.string will get the boot

2010-01-29 Thread Jacob Carlborg
On 1/29/10 18:36, Andrei Alexandrescu wrote: I plan a few improvements to Phobos that will improve string handling. Currently arrays of characters count as random-access ranges, which is not true for arrays of char and wchar. I plan to make std.range aware of that and only characterize char[] an

Re: std.string will get the boot

2010-01-29 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: Currently arrays of characters count as random-access ranges, which is not true for arrays of char and wchar. I plan to make std.range aware of that and only characterize char[] and wchar[] (and their qualified versions) as bidirectional ranges. 32 bits

Re: std.string will get the boot

2010-01-29 Thread bearophile
Andrei Alexandrescu: > Currently arrays of characters count as random-access ranges, which is > not true for arrays of char and wchar. I plan to make std.range aware of > that and only characterize char[] and wchar[] (and their qualified > versions) as bidirectional ranges. 32 bits are not enou

std.string will get the boot

2010-01-29 Thread Andrei Alexandrescu
I plan a few improvements to Phobos that will improve string handling. Currently arrays of characters count as random-access ranges, which is not true for arrays of char and wchar. I plan to make std.range aware of that and only characterize char[] and wchar[] (and their qualified versions) as