January 07
On 1/7/2024 11:52 AM, brianush1 wrote:
> Not arsd.sqlite, nor any other library, defines their own interpolated strings. Importing a library does not and cannot change the behavior of interpolated strings, that is a misunderstanding. Library functions simple take in the interpolated string using a vararg template and do literally *whatever they want with it,* since they're given all the information about the interpolated string, including the evaluated expressions that were inside the string.

Thanks for the clarification. I had indeed misunderstood it.

So that means db.execi() is the template that adjusts how the call to sql is made. (I had assumed it was part of the sql api, rather than a wrapper.)

This makes it no different than DIP1027 in that regard.

It is not really necessary to have a marker to say if an argument is a literal or a variable. Consider this program:

```
import std.stdio;

void main()
{
    writeln("hello".stringof);
    string foo = "betty";
    writeln(foo.stringof);
}
```

Which, when run, prints:

"hello"
foo

and so a template, by using .stringof, can determine if a tuple element is a string literal or a variable.
January 07
On 1/7/2024 11:09 AM, Bruce Carneal wrote:
>> It's true that in order for this to work,
>>
>> ```
>> db.execi(i"INSERT INTO sample VALUES ($(id), $(name))");
>> ```
>> would need to be written as:
>> ```
>> db.execi(xxx!(i"INSERT INTO sample VALUES ($(id), $(name))"));
> 
>> ```
>> where `xxx` is the thoroughly unimaginative name of the
> ...
> 
> So 1027 is equivalently good in this aspect as long as programmers are conscientious in their definition and use of a typing convention?

It turns out this is an issue for DIP1036 as well, as db.execi() is the template. I hadn't realized that.


> Unless 1036e is believed to be very difficult to implement correctly, or has nasty cross dependencies that could cause problems later, this would seem to be a bad trade (hypothetical? simplification of implementation in exchange for making things harder for users).

Apparently DIP1027 is no harder for users than DIP1036.

January 07

On Sunday, 7 January 2024 at 17:47:37 UTC, monkyyy wrote:

>

zig will probably win the c killer race

The race is over for a language like Zig that requires you to learn a new syntax and do things differently. Rust has the users that don't want GC, and Go has those that do. D has the advantage that you can write C code as you've always done, mixing in conveniences as you go. Predictions are always tough when they involve the future, but it's hard to see Zig gaining much traction when Rust and Go are established in that area. (I haven't looked at Zig recently. Maybe things have changed. I couldn't find a reason to use it when I investigated earlier.)

January 07
On Sun, Jan 07, 2024 at 04:43:17PM +0000, Lance Bachmeier via Digitalmars-d 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.

Are you sure you have your facts straight? AFAIK the pseudonymous trolls who posted about private or this or that complaint were not Adam, they were some other disgruntled former D user who has since left.  AFAIK Adam has never engaged in such tactics and was in close contact with the core D team until the recent spat (which is the culmination of ongoing disagreements on governance that started more recently).


> Whether there are useful insights from this or any other fork will depend on what they do with it. If there's too much incompatibility of code, due to breaking changes, it won't have much effect. There's already Nim, Rust, Go, Zig, etc., to compare with and the forks will in each case be just another language.

Adam has stated (publicly, in the opendlang github discussions) that he does not plan to make major changes to the language that would massively break compatibility.  But of course, if this fork continues independently then over time things will diverge sooner or later.


> > > That D hasn't taken over the world is beside the point; good things aren't always popular, e.g., Scheme, and sometimes bad things are very popular, e.g., Windows, JavaScript, C/C++.
> > 
> > Now this is the point where I have to totally disagree with you. It doesn't suffice for a system to be well designed and great to use "in theory", there must also be tooling, documentation, thousands if not millions of samples, and an active community.
> 
> Not really. Those things come after the userbase gets large. I was using Python in the 1990s and I can assure you that the growth did not come because of good tooling, documentation, or code samples. Similarly, I was using R when you used Emacs or a plain text editor, the documentation was similar to Linux man pages, and you asked questions on a mailing list with Brian Ripley. Only after it took off did they build RStudio. What both languages had was a small, dedicated group of users that were willing and able to build useful things with the language.

As somebody has said, it depends on your definition of "success".  If your definition of success is popularity, then sure, you need a big community, lots of existing code, hype, etc..  By that measure C++ is more successful than D and I should be using C++ instead.  But I came to D not because of popularity, but because of technical merit.  I would rather stay with a small, relatively unknown community where technical excellence plays a deciding role, than in a large community of mediocrity where popularity is the deciding factor.  So my definition of success is rather different from what some have been using when bemoaning the current state of D.


T

-- 
Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? -- Michael Beibl
January 07
On 1/7/2024 12:08 PM, matheus wrote:
> I think it's this one: 

Thank you. It turns out I had a misunderstanding, so I don't need it.
January 07

On Sunday, 7 January 2024 at 21:12:11 UTC, Lance Bachmeier wrote:

>

On Sunday, 7 January 2024 at 17:47:37 UTC, monkyyy wrote:

>

zig will probably win the c killer race

The race is over for a language like Zig that requires you to learn a new syntax and do things differently. Rust has the users that don't want GC, and Go has those that do. D has the advantage that you can write C code as you've always done, mixing in conveniences as you go. Predictions are always tough when they involve the future, but it's hard to see Zig gaining much traction when Rust and Go are established in that area. (I haven't looked at Zig recently. Maybe things have changed. I couldn't find a reason to use it when I investigated earlier.)

The first derivative of the issues count is still positive and you see it in practice. Every time I check in on the Zig project and try to use it for something real, I run into a show-stopper.

The documentation is simply awful -- not only sparse, but frequently inaccurate. It reminds me of BSD4.3 40 years ago -- motto: "it was hard to build, it should be hard to use". Running it on an overloaded Vax 780 made just experience just that much more wonderful.

Having said that, I think there is some good work being done by the Zig people. But my guess is that they have a long way to go. I'll be surprised if they make Andrew's 2025 estimate for release.

January 07

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

>

Whether there are useful insights from this or any other fork will depend on what they do with it. If there's too much incompatibility of code, due to breaking changes, it won't have much effect. There's already Nim, Rust, Go, Zig, etc., to compare with and the forks will in each case be just another language.

Realistically speaking, the competition in "System level programming language" is really tough, and it's unreasonable to compete there. But there simply isn't a language that's as easy to use as C#, and as quick and performing as C++. I came to D from C++ thinking it would be a good match, and it really is. At times, it even outperforms C++ in some aspects! Now if only it had as good of a standard library as C#, it would be a blessing upon as all.

There simply isn't a GC based language that can be as quick as C++ and as quick to write in as C#. D already has one point, get the other one going and it would be unlike anything else on the market.

January 07

On Sunday, 7 January 2024 at 21:12:11 UTC, Lance Bachmeier wrote:

>

On Sunday, 7 January 2024 at 17:47:37 UTC, monkyyy wrote:

>

zig will probably win the c killer race

The race is over for a language like Zig that requires you to learn a new syntax and do things differently. Rust has the users that don't want GC, and Go has those that do. D has the advantage that you can write C code as you've always done, mixing in conveniences as you go. Predictions are always tough when they involve the future, but it's hard to see Zig gaining much traction when Rust and Go are established in that area. (I haven't looked at Zig recently. Maybe things have changed. I couldn't find a reason to use it when I investigated earlier.)

Rust is a c++ competitor like you cant be that ugly and complex without going for lots of abstractions(also it will fail).

Go is to narrow and owned by google and etc etc etc.

January 07

On Sunday, 7 January 2024 at 17:53:27 UTC, Don Allen wrote:

>

It all depends on how you define "successful". If you define success as having a huge user community, then your paragraph above applies. I would argue that there are alternative ways to measure success. Is Scheme a success? OpenBSD? JS Bach? I say emphatically "yes" (especially regarding Bach) and yet all of them have user communities orders of magnitude smaller than their most popular competitors.

In this context, my definition of "successful" is a language that you can put your trust in.
Like in this thread, just as an example:
https://forum.dlang.org/thread/qwrguthjwvawnjtpzcbf@forum.dlang.org
This is about the question if using D for a major commercial project is a solid business decision.
I am not so sure, to be honest.
And please be assured that I'm not trying to trash-talk here, I just call it as I see it, as a newcomer to the language.

D has some awesome aspects to it, that's why I started looking into it for personal projects. I appreciate that there are some good books, I got the ones by Ali Cehreli, Mike Parker, and Adam Ruppe, plus the one by Kai Nacke on vibe.d. So there's good learning material.

But on the other hand, a lot of people seem to have walked away from the language over the years, like Andrei Alexandrescu. Fine, people walk away from projects all the time, doesn't have to mean anything. But then, looking at the forums, there seems to be a lot of dissent and even a recent fork.

When I tried to get help with my vibe.d project, I didn't get much feedback in this forum and the "official" vibe.d forum at https://forum.rejectedsoftware.com/ seems abandoned entirely. What's that all about? What happened to Sönke Ludwig, did he walk away, too? What does that mean for the future of vibe.d?
Has any large project ever been built with vibe.d? Apparently not: https://forum.dlang.org/thread/mjewutfvitpnlovbwofu@forum.dlang.org

I'm using VS Code as my IDE, mostly because I can use it under Windows and Linux alike. I quite like its good D support provided by the code-d plugin.
Problem is, though, that it hasn't been updated for two years: https://marketplace.visualstudio.com/items?itemName=webfreak.code-d
I asked about that here (https://forum.dlang.org/thread/gwulbuatekebrtrdmyhi@forum.dlang.org) and got no answer. What's up with WebFreak001, is he gone, too? I just don't know.

I will continue with my D/vibe.d project because it is just a fun experiment that I do in my free time. If I get stuck at some point, fine, it still will have been a great learning experience.
But would I stick with D if my business depended on it? Hell no. I'd probably use Go or maybe even C++ with wt or something like that. Something that I can be reasonably sure will still be maintained in 5 years from now.

Maybe I will be able to complete my project successfully. But as to the D language as a whole, it does not feel like a success story to me.

Please feel free to correct me on any and all points that I got wrong (I'm sure there are many) - again, I have been describing my totally subjective impressions, with no intention to offend anyone.

January 07

On Sunday, 7 January 2024 at 17:47:37 UTC, monkyyy wrote:

>

I'll do it for you, d is a c++ killer not a c killer, ...

Sorry, but that is just untrue; with the BetterC subset, D specifically targets C programmers as well.

>

zig will probably win the c killer race ...

Just to throw in my 2 cents on this... when it comes to potential C killers, my money would be on Jai if it ever came out of closed beta.

But that being said, I don't think C will ever truly be killed, at least not in my life time.