697 karma · joined December 5, 2013
For me, using a GC is just a lot easier than making the borrow checker happy. Given that in practice it's rare that the GC is the bottleneck (and when it is I write around it after profiling), the trade-off just isn't worth it for me.
> Are compilation speeds an issue for anyone?
Yes, it's pretty slow to compile.
Yes, it is, especially since the former can be used to implement the latter.
Still not the same.
> Nothing prevents generating a wrapper automatically but 99% of the time that is not very useful. The large majority of Python extension contain Python-specific code to access or return Python objects or act in a pythonic way.
Except, and I cannot stress this enough, at work we're using this to succesfully call into D production code without any Python-specific anything. It just works. The article wasn't even about that, it's about making it work just as seamlessly for C.
In the article, I do this:
``` #include "nanomsg/nn.h" #include "nanomsg/pipeline.h" ```
That's it. I don't think the approaches can be compared.
"if needed" means "needed with any and all C APIs one would be interested in".
That's nice, but not the same - users have to intend to write a Python extension in Nim. With autowrap, you can call unmodified D code (and as shown in the blog, C code as well with dpp). That means code that was never meant for consumption from another language can be made available.
No, because I'm not aware of one existing. The only reason I wrote excel-d is because of business reasons.
> actual Excel in the wild and not libreoffice or openoffice
Where I work, and in many many other places, it's all Excel. It's actually the most used programming language in the world. Maybe it shouldn't be, but it is.
Yep!
> (The other half of the puzzle being a tool called autowrap that wraps the resulting D for consumption by Python.)
Correct.
> I'm not sure whether I personally would ever use this, but it's a very interesting exploration of the subject.
Python was an example. Want to call it from C# instead? Same code. Excel? Same code.
I don't know how Zig does it, I'd have to look.
I expand on why dpp is the way it is in my DConf 2019 talk: https://www.youtube.com/watch?v=79COPHF3TnE&t=8s
There are, and in those, good code can be written. They're the exception. Source: worked there for 7 years.
I worked for 7 years so I know how the software sausage is made. The answer is most definitely "no", and I'm frankly surprised now that the internet works at all.
The reason why header-only libraries exist is because C and C++ don't have an official package manager. That's it. Any other language that does can vendor just as easily. Similarly, pretty much every other language has package management so that's not a point in Go's favour.
From the article, we're left with compilation speed. That's actually important, but Go isn't the only language that has a reference compiler that runs fast!