8 ms·
Plus affine types have gone mainstream. Good stuff, but I'd like memory safety!
by vmchale 7y ago
Plus affine types have gone mainstream. Good stuff, but I'd like memory safety!
- WalterBright 7y agoAn ownership/borrowing system memory safety is in the works for D. There's a prototype of it as a Pull Request: https://github.com/dlang/dmd/pull/10586 https://github.com/dlang/dmd/pull/10586
- sesuximo 7y agothat is really exciting!
- WalterBright 7y agoIndubitably!
- vmchale 7y agoThanks!
- theredbox 7y agoWhat is the type of apps that one should use D for ? I think this is one of the main issues with languages that did not gain traction and that is they are too generic and try to be too many things to too many people. If i exclude the financial backing i think languages that tried to tackle one specific thing did rather well. Rust came to be to address the issue with security and there is not really an alternative. Yes people use it for cli tools or backend services but that’s just because they are riding the hype train. The same with Go. On the other hand we have things like Dart which did not really try to solve an issue people felt they have. The same with Crystal. Nobody really needed faster Ruby that much and if they did they already needed a production ready solution which was just too hard to deliver. A language like Nim reminds me of D. Its author is also a brilliant Phd CS person but I feel like he does not really have a problem to solve. It’s all just an intellectual challenge. Companies like Status.im ( backer of Nim ) have a problem that they are trying to solve by using Nim. Making the right and the perfect solutions is hard but this evolutionary approach is really harming the expansion of the ecosystem. Nim has just too many features and too many approaches to memory management (recent gc:arc release). But it is all too half baked and does not support the features Nim advertises that it has. This is basically the same issue i have with D. I have no idea what I would use D for. And could i rely on D in the domain i pick it for ? Eg the same field where Go excels.
- vmchale 7y ago> Rust came to be to address the issue with security and there is not really an alternative. Yes people use it for cli tools or backend services but that’s just because they are riding the hype train. I like Rust for CLI tools because it takes some nice ML features and it handles strings sensibly.
- jane_red 7y agoLast time I tried to install a Rust-based cli network tool it took literally 4 min to compile it! Seriously, 4 minutes for something that monitors your network load. If this is what it takes to make a cli tool, I'd rather do it in plain BASH :)
- deleted 7y ago[deleted]
- vips7L 7y agoStrings in Rust are the first time I ever got confused about what a String was. It might be sensible, but it's not easy.
- pjmlp 7y agoYou could do the same with OCaml.
- WalterBright 7y ago> Rust came to be to address the issue with security and there is not really an alternative. That will change in the coming months. > I have no idea what I would use D for. And could i rely on D in the domain i pick it for ? D is a general programming language. You can use it for scripts, number crunching, UI, and everything in between. It's been around a long time, and is part of the gcc collection.
- vmchale 7y agoI think the gcc backend is quite attractive! rustc still has some cases it doesn't catch the optimizations gcc does.
- destructionator 7y agoD makes most memory safety bugs disappear through its runtime bounds checking and garbage collection, both proven solutions in a variety of languages. Yes, Walter is working on more compile time stuff too, but the existing runtime checks really do excellent work and shouldn't be overlooked.