On Wednesday, 18 July 2018 at 22:44:33 UTC, aliak wrote:
On Wednesday, 18 July 2018 at 12:10:04 UTC, Seb wrote:
On Wednesday, 18 July 2018 at 03:40:08 UTC, Jon Degenhardt
[...]
[...]
That point is still open for discussion, but at the moment
rcstring isn't a range and the user has to
On Wednesday, 18 July 2018 at 12:03:02 UTC, Eugene Wissner wrote:
Therefore it shouldn't compile at all, but
rcstring("ä")[].split("|")
or
rcstring("ä").byCodePoint.split("|")
+1 to requiring an explicit byCodeUnit or whatever.
For every "obvious" way to interpret a string as a range, you
On Wednesday, 18 July 2018 at 12:10:04 UTC, Seb wrote:
On Wednesday, 18 July 2018 at 03:40:08 UTC, Jon Degenhardt [...]
and whether applications would use arrays and ranges of char
together with rcstring, or rcstring would be used for
everything.
That point is still open for discussion, but
On 2018-07-18 13:37, Seb wrote:
The problem here is this would also lead to very confusing behavior for
newcomers, e.g.
```
"ä".split.join("|") == �|�
```
How about not giving access to operate on individual characters. If they
need to do that they should operate on an array of bytes. Too
On Wednesday, July 18, 2018 12:15:52 Seb via Digitalmars-d wrote:
> Well, the problem of it being a range of char is that this might
> lead to very confusing behavior, e.g.
>
> "ä".rcstring.split.join("|") == �|�
>
> So we probably shouldn't go this route either.
I don't know. I'm fine with it
On Wednesday, 18 July 2018 at 11:56:39 UTC, Seb wrote:
[snip]
Yes, Array is a reference-counted Array, but it also has a
reference-counted allocator.
I see. Is it really a good idea to make the ownership/lifetime
strategy part of the container? What happens when you want to
make nogc
On Wednesday, 18 July 2018 at 11:56:39 UTC, Seb wrote:
[snip]
I think part of the above design decision connects in with why
rcstring stores the data as ubytes, even for wchar and dchar.
Recent comments suggest that it is related to auto-decoding.
Yes rcstring doesn't do any auto-decoding
On Tuesday, 17 July 2018 at 18:09:13 UTC, Jonathan M Davis wrote:
On Tuesday, July 17, 2018 17:28:19 Seb via Digitalmars-d wrote:
On Tuesday, 17 July 2018 at 16:58:37 UTC, Jonathan M Davis
wrote:
> [...]
Well, there are few cases where the range type doesn't matter
and one can simply compare
On Wednesday, 18 July 2018 at 03:40:08 UTC, Jon Degenhardt wrote:
On Tuesday, 17 July 2018 at 15:21:30 UTC, Seb wrote:
So we managed to revive the rcstring project and it's already
a PR for Phobos:
https://github.com/dlang/phobos/pull/6631 (still WIP though)
The current approach in short:
-
On Wednesday, 18 July 2018 at 11:37:33 UTC, Seb wrote:
On Tuesday, 17 July 2018 at 17:41:05 UTC, Jacob Carlborg wrote:
On 2018-07-17 17:21, Seb wrote:
- _no_ range by default (it needs an explicit
`.by!{d,w,}char`) (as in no auto-decoding by default)
What do you think about this approach?
On Tuesday, 17 July 2018 at 18:43:47 UTC, jmh530 wrote:
On Tuesday, 17 July 2018 at 15:21:30 UTC, Seb wrote:
So we managed to revive the rcstring project and it's already
a PR for Phobos:
[snip]
I'm glad this is getting worked on. It feels like something
that D has been working towards
On Tuesday, 17 July 2018 at 17:41:05 UTC, Jacob Carlborg wrote:
On 2018-07-17 17:21, Seb wrote:
- _no_ range by default (it needs an explicit
`.by!{d,w,}char`) (as in no auto-decoding by default)
What do you think about this approach? Do you have a better
idea?
I vote for .by!char to be
On Tuesday, 17 July 2018 at 16:58:37 UTC, Jonathan M Davis wrote:
If it's not a range by default, why would you expect _anything_
which operates on ranges to work with rcstring directly? IMHO,
if it's not a range, then range-based functions shouldn't work
with it, and I don't see how they even
On Tuesday, July 17, 2018 22:45:33 Andrei Alexandrescu via Digitalmars-d
wrote:
> On 7/17/18 12:58 PM, Jonathan M Davis wrote:
> > If it's not a range by default, why would you expect_anything_ which
> > operates on ranges to work with rcstring directly?
>
> Many functions do not care about the
On Tuesday, 17 July 2018 at 15:21:30 UTC, Seb wrote:
So we managed to revive the rcstring project and it's already a
PR for Phobos:
https://github.com/dlang/phobos/pull/6631 (still WIP though)
The current approach in short:
- uses the new @nogc, @safe and nothrow Array from the
collections
On 18/07/2018 5:41 AM, Jacob Carlborg wrote:
On 2018-07-17 17:21, Seb wrote:
- _no_ range by default (it needs an explicit `.by!{d,w,}char`) (as in
no auto-decoding by default)
What do you think about this approach? Do you have a better idea?
I vote for .by!char to be the default.
I'm
On 7/17/18 12:58 PM, Jonathan M Davis wrote:
If it's not a range by default, why would you expect_anything_ which
operates on ranges to work with rcstring directly?
Many functions do not care about the range aspect, but do care about the
string aspect. Consider e.g. chdir.
On Tuesday, 17 July 2018 at 15:21:30 UTC, Seb wrote:
So we managed to revive the rcstring project and it's already a
PR for Phobos:
[snip]
I'm glad this is getting worked on. It feels like something that
D has been working towards for a while.
Unfortunately, I haven't (yet) watched the
On Tuesday, July 17, 2018 17:28:19 Seb via Digitalmars-d wrote:
> On Tuesday, 17 July 2018 at 16:58:37 UTC, Jonathan M Davis wrote:
> > On Tuesday, July 17, 2018 15:21:30 Seb via Digitalmars-d wrote:
> >> [...]
> >
> > If it's not a range by default, why would you expect _anything_
> > which
On 2018-07-17 17:21, Seb wrote:
- _no_ range by default (it needs an explicit `.by!{d,w,}char`) (as in
no auto-decoding by default)
What do you think about this approach? Do you have a better idea?
I vote for .by!char to be the default.
--
/Jacob Carlborg
On Tuesday, 17 July 2018 at 16:58:37 UTC, Jonathan M Davis wrote:
On Tuesday, July 17, 2018 15:21:30 Seb via Digitalmars-d wrote:
[...]
If it's not a range by default, why would you expect _anything_
which operates on ranges to work with rcstring directly? IMHO,
if it's not a range, then
On Tuesday, July 17, 2018 15:21:30 Seb via Digitalmars-d wrote:
> So we managed to revive the rcstring project and it's already a
> PR for Phobos:
>
> https://github.com/dlang/phobos/pull/6631 (still WIP though)
>
> The current approach in short:
>
> - uses the new @nogc, @safe and nothrow Array
So we managed to revive the rcstring project and it's already a
PR for Phobos:
https://github.com/dlang/phobos/pull/6631 (still WIP though)
The current approach in short:
- uses the new @nogc, @safe and nothrow Array from the
collections library (check Eduardo's DConf18 talk)
- uses
23 matches
Mail list logo