January 08

On Monday, 8 January 2024 at 04:00:52 UTC, H. S. Teoh wrote:

>

On Mon, Jan 08, 2024 at 02:58:58AM +0000, Don Allen via Digitalmars-d wrote: [...]

[...]

>

If you're not profiling and you talk about performance, I probably won't bother reading any further. Or perhaps I would, but more for the entertainment value than any true technical merit.

Now how do you interpret the following Don Allen's sentence: "If your application is cpu-limited but spends most of its time in some library, e.g.,sqlite, or in system-calls, re-writing it in C++ will only help in proportion to the time spent in your own code, which is small by assumption." ?

The information about the time spent in sqlite or in system-calls is trivially obtainable via running a profiler and pretty much everyone knows this. What kind of alternative method of obtaining this information do you imagine Don Allen might have used? There's no need to write angry walls of text about the most elementary things.

January 08

On Sunday, 7 January 2024 at 16:43:17 UTC, Lance Bachmeier wrote:

>

I'd much rather Adam put his time into a fork, rather than the more common approach where he'd post here under various names, make ridiculous claims, and vandalize the discussions. If you're new, you may not have seen the many posts from someone that doesn't like private at the module level.

Do you think that there can't possibly be more than one person in the whole world, who doesn't like the D's private keyword? And that this single person persistently registering under different names is the only possible explanation? Really?

I did mention the private keyword in this forum before. I guess, now I'm starting to understand the reasons why some topics provoke unusually hostile reaction around here.

January 08

On Monday, 8 January 2024 at 08:25:08 UTC, Siarhei Siamashka wrote:

>

Do you think that there can't possibly be more than one person in the whole world, who doesn't like the D's private keyword? And that this single person persistently registering under different names is the only possible explanation? Really?

There are. But there were a set of users with unusually similar style of writing and argument set, which was easy to spot.

January 08

On Monday, 8 January 2024 at 08:25:08 UTC, Siarhei Siamashka wrote:

>

On Sunday, 7 January 2024 at 16:43:17 UTC, Lance Bachmeier wrote:

>

I'd much rather Adam put his time into a fork, rather than the more common approach where he'd post here under various names, make ridiculous claims, and vandalize the discussions. If you're new, you may not have seen the many posts from someone that doesn't like private at the module level.

Do you think that there can't possibly be more than one person in the whole world, who doesn't like the D's private keyword? And that this single person persistently registering under different names is the only possible explanation? Really?

I did mention the private keyword in this forum before. I guess, now I'm starting to understand the reasons why some topics provoke unusually hostile reaction around here.

Here's one example, posted under the name "UmmReally", even admitting that it's off-topic:

>

In my version of D (a fork based on someone elses work), I am not 'forced' to use that 'workaround'.

Even javascript has private to the class.

D is comlete joke! i.e. ..> that you cannot even make a private member within a class (except through some stupid 'workaround').

So with that...back on to topic.. YES 'offical' D really IS that bad!

(but not my version of D ;-)

btw. This is not really a complaint ;-)

It's great that I can create my own fork based on someone else work (to do what I can do in anyother langauge, including javascript!).

There's nothing useful about a post like that. But I'm not just talking about this topic. We used to have trolls waiting for any positive post so that they could add a bunch of fabricated/misleading statements to the thread. They wanted to make it so Google wouldn't return anything positive about D (and they mostly succeeded).

January 08
On Sunday, 7 January 2024 at 18:51:40 UTC, Walter Bright wrote:
> On 1/7/2024 1:22 AM, Paolo Invernizzi wrote:
>> [...]
>
> Of course!
>
>
>> [...]
>
> I asked the question if adding a template call constituted an "undue" burden. What it does do is send a clear visual signal that the default behavior of istring is being adjusted.
>
>> [...]
>
> Using DIP1036 for string interpolation means that for using it for sql calls means:
>
> 1. if something other than core.interpolation is imported at the global level, it will apply to all users of istring in that module, not just the ones calling sql functions. It means calling writeln with istrings won't do what is expected, and this is not visually apparent by looking at the code, nor is it checkable by the compiler.
>
> 2. an alternative would be locally importing core.interpolation or arsd.sqlite as required for each scoped use of istrings.

and you _still_ misunderstand DIP 1036. which is the whole problem here. and we've told you repeatedly that you misunderstand it. please just go and look at the implementation.
January 08
On Monday, 8 January 2024 at 14:09:09 UTC, DrDread wrote:
> On Sunday, 7 January 2024 at 18:51:40 UTC, Walter Bright wrote:
>> ...
>
> and you _still_ misunderstand DIP 1036. which is the whole problem here. and we've told you repeatedly that you misunderstand it. please just go and look at the implementation.

I read a draft 1036 spec from Atila on his publicly accessible github here:
https://github.com/atilaneves/DIPs/blob/string-interpolation/Interpolation.md

It might not still be up but I found it approachable.  Again, though, it's a draft and might not match the code (or the actual intent for that matter).  Still, a useful possibility for those who prefer not to look at code in the early going.

January 09
On 09/01/2024 3:34 AM, Bruce Carneal wrote:
> It might not still be up but I found it approachable.  Again, though, it's a draft and might not match the code (or the actual intent for that matter).  Still, a useful possibility for those who prefer not to look at code in the early going.

The main issue with it that I've seen is that it still uses the ``$$`` escape for ``$``, rather than ``\$``.

Apart from that it looks ok.
January 08

On Monday, 8 January 2024 at 14:34:26 UTC, Bruce Carneal wrote:

>

On Monday, 8 January 2024 at 14:09:09 UTC, DrDread wrote:

>

On Sunday, 7 January 2024 at 18:51:40 UTC, Walter Bright wrote:

>

...

and you still misunderstand DIP 1036. which is the whole problem here. and we've told you repeatedly that you misunderstand it. please just go and look at the implementation.

I read a draft 1036 spec from Atila on his publicly accessible github here:
https://github.com/atilaneves/DIPs/blob/string-interpolation/Interpolation.md

It might not still be up but I found it approachable. Again, though, it's a draft and might not match the code (or the actual intent for that matter). Still, a useful possibility for those who prefer not to look at code in the early going.

I really wish we didn't have to force parentheses in $() if the only thing inside the expression is an alphanumeric variable name.

There's the example of:

enum result = text(
    i"@property bool $(name)() @safe pure nothrow @nogc const {
        return ($(store) & $(maskAllElse)) != 0;
    }
    @property void $(name)(bool v) @safe pure nothrow @nogc {
        if (v) $(store) |= $(maskAllElse);
        else $(store) &= cast(typeof($(store)))(-1-cast(typeof($(store)))$(maskAllElse));
    }\n"
);

But why not take it a step further and allow this:

enum result = text(
    i"@property bool $name() @safe pure nothrow @nogc const {
        return ($store & $maskAllElse) != 0;
    }
    @property void $name(bool v) @safe pure nothrow @nogc {
        if (v) $store |= $maskAllElse;
        else $store &= cast(typeof($store))(-1-cast(typeof($store))$maskAllElse);
    }\n"
);

To me that's more readable then the first example where I have to count the closing parens to figure out where an expression starts and ends.

The $() should just be an escape hatch when you need more complex expressions. For example:

int foo = 2;
int bar = 4;
writeln(i"$foo + $bar is $(foo + bar)");  // 2 + 4 is 6

I haven't read any rationale why parentheses are absolutely required in any of the DIPs I've skimmed through.

January 09
On 09/01/2024 3:50 AM, Andrej Mitrovic wrote:
> I really wish we didn't have to force parentheses in |$()| if the only thing inside the expression is an alphanumeric variable name.

It isn't.

It was voted on as the common denominator that everyone could agree upon who voted.

Adding support for an identifier is trivial.

So would adding formatting support ala f-string.

At least this way it could be expanded upon later.
January 08
On Monday, 8 January 2024 at 14:58:13 UTC, Richard (Rikki) Andrew Cattermole wrote:

>
> It was voted on as the common denominator that everyone could agree upon who voted.

If optional () for single-token template argument lists had been put to a vote, the majority would have voted against it. I doubt anybody would want to remove it today.

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18