January 29, 2016
On 1/29/2016 7:39 AM, bearophile wrote:
> [...]

Nice to see you back, bearophile!

January 29, 2016
On Friday, 29 January 2016 at 18:43:19 UTC, Walter Bright wrote:
> On 1/29/2016 7:39 AM, bearophile wrote:
>> [...]
>
> Nice to see you back, bearophile!

I don't why but I thought that Bearophile and Ketmar were the same person. Anyway, is good to see he's coming back.

JohnCK.
January 29, 2016
On Friday, 29 January 2016 at 18:43:19 UTC, Walter Bright wrote:
> On 1/29/2016 7:39 AM, bearophile wrote:
>> [...]
>
> Nice to see you back, bearophile!

Having not been around here much myself recently, I didn't even realize he was away, but ... agree :-)
January 30, 2016
On Friday, 29 January 2016 at 17:50:04 UTC, jmh530 wrote:
> My understanding is that D has a lot of options for behavior similar to RAII, but it does not have the full capability. What would be the most important thing for D to change to improve the experience of binding to C++?

Support RAII: constructors, destructors and value semantics.
January 30, 2016
On Friday, 29 January 2016 at 15:39:53 UTC, bearophile wrote:
> qznc:
>
> On Friday, 29 January 2016 at 09:00:52 UTC, qznc wrote:
>> D is a broader language and is applicable in more situations.
>> In many cases you don't care and don't want to care about memory management.
>
> Learning to manage memory in Rust takes lot of time and practice, it's a bit painful. I am sometimes able to write working D code almost as quickly as Python code, but writing similar code in Rust takes me much more time.
>
> So I think for both small script-like programs, and general application code (where code safety is not the most important thing), D wins over Rust.
>
> D is also more flexible (higher order templates, better CTFE, unrestricted UFCS, etc), and you can port Python or C code to D faster than to Rust.
>
> So I think Rust targets a smaller number of coding purposes compared to D. Rust could also replace the code you want to write in OcaML, like compiler-like programs (thanks to Rust enums and pattern matching).
>
> Safety and correctness of the code are very important for me. Regarding safety & correctness I think there's this ordering:
>
> Rust > D > C++14 > C
>
> If you talk about correctness you think about Ada too. Rust code seems usually more succinct compared to Ada code. Ada is more mature and it has lot of small features missing from Rust/D, that help make the code more correct (like integer subsets, static invariants, stronger typing for array indexing, SPARK annotations to manage global mutables safely, and so on). I don't know if such safety features will be added to Rust, I am dubious.
>
> In the C/Ada world you have language subsets like MISRA/SPARK that people use in high integrity system. I think Rust still lacks something like that.
>
> Bye,
> bearophile

Hi bearophile.

Welcome back.

I haven't used Ocaml, but was intrigued by it after seeing Yaron Minsky's talks.  To what extent can pattern matching, strong types with invariants and other things Ocaml features be implemented idiomatically in D?  Eg I know D has invariants, but that seems to be more a debug mode thing, and I am not sure if they are doing the same as what Minsky described in his talk.

Bloomberg seem to use it for front end stuff as they open sourced a Javascript back end for the Ocaml compiler (and that's not the only such back end).

How productive do you find coding in Ada ?


January 30, 2016
Laeeth Isharc:

On Saturday, 30 January 2016 at 16:51:09 UTC, Laeeth Isharc wrote:
> I haven't used Ocaml, but was intrigued by it after seeing Yaron Minsky's talks.  To what extent can pattern matching, strong types with invariants and other things Ocaml features be implemented idiomatically in D?  Eg I know D has invariants, but that seems to be more a debug mode thing, and I am not sure if they are doing the same as what Minsky described in his talk.

Rust allows you to write very OCaML-like code, the main difference is that you need to memory manage manually (and Rust doesn't have a GIL).

D Algebraic isn't very good, and the D/Phobos pattern matching is minimal, so to write compiler-like code in D you need a style quite different from the OcaML/F#/SML/Haskell code. On the other hand Rust is less flexible, sometimes even C-like for loops are not handy to do in Rust.

The Servo browser and the Rustc compiler are two of the main projects written in Rust, so sometimes Rust looks like a browswer-driven language, and this means Rust developers sometimes seem to not understand or not care that lot of people have other different needs. There are several kinds of code that D allows you to write quite better than Rust (generic application code, script-like code, explorative scientific numerical code (like ndslice), medium-integrity code, metaprogramming, compile-time computations, template-level computations and specializations, higher order template magic, and so on. In general Rust seems a more specialized language).


> How productive do you find coding in Ada ?

In Ada you can be productive if you use it for the purposes it was invented for, but most times you don't write that kind of code.

I miss some Ada features, and I've missed the strictness of the Ada compiler that catches lot of bugs, but for most things today I prefer a more modern languages.

In Ada you need more time to write the code and make it run, but later you save some debugging time, even compared to D. I like languages that avoid me most common bugs, even if I need more time to write it. To write Ada code you need to remember lot of times, because Ada is a quite large language, but most things are quite logical and straightforward, so learning Ada is just a matter of having elephant's memory, you don't need to be smart. Rust is a much smaller language, but you need to think more about your code, otherwise it will never compile :-) D is more like Python, you don't need lot of memory to use it, and the garbage collector saves you lot of thinking (if you are writing small programs).

I think D should relax and keep improving its strengths (like C++ interoperability), fix some of its holes (safety, GC-less programming, fixing its contract-driven programming experience, etc), improve its medium-integrity coding, and keep going on as usual, slowly getting better. The Rust and D niches are sufficiently different, there's minimal overlapping in their purposes and niches.

Bye,
bearophile
January 31, 2016
On Thursday, 28 January 2016 at 22:30:51 UTC, nbro wrote:
> [...]

I retransmission this post in rust's user-forum.
It is url: https://users.rust-lang.org/t/rust-vs-dlang-i-want-more-experienced/4472
there have more point.
January 30, 2016
BTW, your email server is rejecting my emails to you!
January 30, 2016
On 1/30/2016 12:48 PM, bearophile wrote:
> [...]

Thanks for writing this, you make a lot of points I wasn't aware of.

January 31, 2016
On 31/01/16 6:00 PM, Walter Bright wrote:
> BTW, your email server is rejecting my emails to you!

Worse case scenario for Laeeth contact via LinkedIn.