On Monday, 21 February 2022 at 07:00:52 UTC, eugene wrote:
On Monday, 21 February 2022 at 04:46:53 UTC, Chris Piker wrote:
On Sunday, 20 February 2022 at 18:00:26 UTC, eugene wrote:
I'm adverse to reading it closely since there was no license
file and don't want to accidentally violate
On 2/22/22 05:53, steve wrote:
> What I was trying
> to return is function that can then be applied to e.g. an array.
I think an eponymous template that defines an alias as in your original
post can be used as well:
template mappified(alias func) {
import std.algorithm : map;
alias
On 2/22/22 09:25, frame wrote:
> Well, I think it's ok for strings but it shouldn't do it for simple
> arrays
string is a simple array as well just with immutable(char) as elements.
It is just an alias:
alias string = immutable(char)[];
> where it's intentional that I want to process the
On Tuesday, 22 February 2022 at 17:33:18 UTC, H. S. Teoh wrote:
On Tue, Feb 22, 2022 at 05:25:18PM +, frame via
Digitalmars-d-learn wrote:
On Tuesday, 22 February 2022 at 13:25:16 UTC, bauss wrote:
> Welcome to the world of auto decoding, D's million dollar
> mistake.
Well, I think it's
On Tue, Feb 22, 2022 at 05:25:18PM +, frame via Digitalmars-d-learn wrote:
> On Tuesday, 22 February 2022 at 13:25:16 UTC, bauss wrote:
>
> > Welcome to the world of auto decoding, D's million dollar mistake.
>
> Well, I think it's ok for strings but it shouldn't do it for simple
> arrays
On Tuesday, 22 February 2022 at 13:25:16 UTC, bauss wrote:
Welcome to the world of auto decoding, D's million dollar
mistake.
Well, I think it's ok for strings but it shouldn't do it for
simple arrays where it's intentional that I want to process the
character and not a UTF-8 codepoint.
On Tuesday, 22 February 2022 at 12:53:03 UTC, Adam D Ruppe wrote:
On Tuesday, 22 February 2022 at 12:48:21 UTC, frame wrote:
What am I missing here? Is this some UTF conversion issue?
`front` is a phobos function. Phobos treats char as special
than all other arrays.
Ah, ok. It directly
On Tuesday, 22 February 2022 at 13:53:34 UTC, steve wrote:
On Monday, 21 February 2022 at 23:07:44 UTC, Ali Çehreli wrote:
On 2/21/22 12:44, steve wrote:
...
thanks for your help. I'm unfortunately still a bit confused.
Maybe I wasn't clear or maybe I'm just missing something here.
What I
On Monday, 21 February 2022 at 23:07:44 UTC, Ali Çehreli wrote:
On 2/21/22 12:44, steve wrote:
...
thanks for your help. I'm unfortunately still a bit confused.
Maybe I wasn't clear or maybe I'm just missing something here.
What I was trying to return is function that can then be applied
On Tuesday, 22 February 2022 at 12:48:21 UTC, frame wrote:
What am I missing here? Is this some UTF conversion issue?
```d
string a;
char[] b;
pragma(msg, typeof(a.take(1).front)); // dchar
pragma(msg, typeof(b.take(1).front)); // dchar
```
Welcome to the world of auto decoding, D's million
On Tuesday, 22 February 2022 at 12:48:21 UTC, frame wrote:
What am I missing here? Is this some UTF conversion issue?
```d
string a;
char[] b;
pragma(msg, typeof(a.take(1).front)); // dchar
pragma(msg, typeof(b.take(1).front)); // dchar
```
This is a feature of the D standard library known
On Tuesday, 22 February 2022 at 12:48:21 UTC, frame wrote:
What am I missing here? Is this some UTF conversion issue?
`front` is a phobos function. Phobos treats char as special than
all other arrays.
It was a naive design flaw that nobody has the courage to fix.
Either just don't use
What am I missing here? Is this some UTF conversion issue?
```d
string a;
char[] b;
pragma(msg, typeof(a.take(1).front)); // dchar
pragma(msg, typeof(b.take(1).front)); // dchar
```
13 matches
Mail list logo