D is introducing ownership/borrowing

dlang.org/blog/2019/07/15/ownership-and-borrowing-in-d/
Finally, something that is like Rust but isn't Rust.

Attached: d6.png (200x200, 5K)

Other urls found in this thread:

dlang.org/phobos/std_container_array.html
code.dlang.org/packages/tanya.
twitter.com/SFWRedditVideos

D
e
a
d

Better Dust than Rust!

wait wat? isnt d == c++ with garbage collection? (last time i touched it was probably 18 years or so ago, did some path tracing shit with it iirc)

D is Rust without trannies and with no redditors but sadly pointless and useless. Just give up and learn haskell and use C instead.

to better rephrase this, why would you even need borrow checks when the memory is going to be gc anyway?

You could already selectively opt out of GC. Now you can use borrow checking in GC-free functions

Actually the GC is one of the main downside of D.
Except for that, it tries to improve C++ significantly.

Ownership is just as big a problem with GC because reference to resources can be unintentionally be stored in objects which will never be cleaned up.
With ownership, it becomes more difficult to unintentionally create these types of resource leaks.

Rustrannies BTFO

Yearly reminder that things like garbage collector and borrow checks are crutches designed to aid brainlets

somebody please put D out of its misery, this is Perl 6 level sad

trannies BTFO
now there are literally zero reasons to learn rust

D done ownership borrowing the right way

lol dead

too little too late

>D will let me finally own slaves

D's garbage collector can be disabled when it makes sense for the programmer to manually take over management of some memory, this is intended for those situations

All forms of static analysis are only there to aid brainlets, that's why I do all my programming in Fortran 77

>he doesn't write his code in binary

I'm fairly sure the only way to do that is with -betterC, which instantly disables most D language features and libraries.

You can literally make any function with @nogc.

RIP in piss
Dust to Rust

Yeah you're right, but I meant to disable it entirely so nothing can use it, isn't it the case that if you do that the standard libraries and some language features will no longer work? I don't even use D I'm just curious

you can just mark your main with @nogc. You don't need to go full -betterC unless you want to.
And yeah, you lose some things because of coupling.
But there's alternatives like
dlang.org/phobos/std_container_array.html

Computers are crutches designed to aid brainlets

Attached: Cyril.png (169x168, 10K)

NOOOOOOOOOOOOOOOOOOOOOO!!!!
THIS FEATURE WAS INVENTED BY TRANNIIIIIES!!!! TRANNIEEEEEEEEEEEES!!!! AAAAAAAAAAAAAAHHHHHHHH! TRANNIIIIIIIIIIIIIEEEEESSS!!!!!!!!

Please avoid making extremely low quality posts.

Sorry.

>pointless and useless
Just like you

Garbage collection is optional in D

Man this language really is desperate to stay relevant huh?

If you disable it, you remove the majority of the features. You're left with a feature-deficient C++.

>Garbage collection is optional in D

>
If you disable it, you remove the majority of the features. You're left with a feature-deficient C++.
this

borrow checking in D is just an add-on, its not replacing GC, you still have to use GC for the main features of the language

D is literally the best language there is at this point in terms of raw power. There's a reason high frequency trading and advertising firms are picking it up for the sake of competitive advantage.

Name a few.

>in terms of raw power
In what way does this language beat C++ in terms of "raw power"? Name even a single aspect.

nice try Walter

Back at you, Patrick.

>Dfags discover smart pointers

don't tell them about RAII

smart pointers aren't borrowing, borrowing is an extension of raii

Do you think these companies like facebook, google, apple, twitter, norton, kaspersky, nod, intel, amd, arm, huawey, xiaomi, boing, amazon don`t use dlang?

I know several big SV companies have D repos on GutHub. I was asking specifically about HFT and advertising companies.

That's one more language Cniles can's shill anymore.

Attached: rust lmao.png (600x600, 249K)

Cniles never shilled D, or even C++. Hell, I bet most of them will never even appreciate Zig.

>*stay* relevant
It *is*?

Bad phrasing, clearly D wants to become relevant by bandwagoning. Which never works.

>D is Rust
So it's shit?

But I want to virtue signal with my pointless meme flavor of the month language, so why should I use Rust?

D has both of these. And now borrowing as well.

Signal your solidarity with the third world by using Java.

I wonder why sociomatic had to sponsor d-conf.

another feature that will be half implemented.

i love D, been using it for a decade, but its managemente and direction (or lack thereof) is just abismal
the community has complained countless times but they dont care.

features half implemented, bugs, technical debt, no tooling, no debugging, fucking GC leaks and is slow!

the owners (academic assholes that are completly out of touch with the world) treat this as a toy language and try to (badly) implement any feature they think its cool no matter how it will impact existing features or the community.

they have no vision and no interest in business. i guess my point is:

THERE IS A BIG REASON WHY SUCH A COOL LANGUAGE STAYS IRRELEVANT AFTER 20 YEARS!

This kills D. Why would any sane language owner force a BC on their users. Rust was made because it was assumed C++ programmers are too dumb for C++.

Attached: 1474496560896.jpg (633x738, 85K)

>Isn’t this scheme incompatible with the way people normally write D code, and won’t it break pretty much every D program in existence? And not break them in an easily fixed way, but break them so badly they’ll have to redesign their algorithms from the ground up?
>Yup, it sure is. Except that D has a (not so) secret weapon: function attributes. It turns out that the semantics for the Ownership/Borrowing (aka OB) system can be run on a per-function basis after the usual semantic pass has been run.
Optional unlike rust.

Because any significant engineering project will end up reinventing ownership if no language features for it are provided. C++ added unique_ptrs for similar reasons.

unique_ptr is exactly borrowing.

D already has plenty of ownership stuff.
They just added this too.

Is there another all-rounder expressive OOP language like D that compiles to native executables? I'd like to say Crystal, but Crystal is unfinished and still doesn't work on Windows.

Check out Drill project and Minerva

Thanks, Federico.

Not him, but I really like the software. So maximum shilling.

OOP with compiled binaries theres rust, c++, D
with GC included theres nim and go

everything else is just a hobby project and not worth getting into because you will reach roadblocks with lack of documentation or support or bus etc

Syntax is confusing as fuck. Who thought using the same operator for moving and copying is a good idea? It's all ok as long as they declare variables and assign them right away, but if pointers were declared previously it's too obscured. Should've at least used ampersand or something.
That's why I hate those meme languages.

Just use Rust
>but muh trannies muh dilate
the coc only applies to contributions to Rust itself

>learn haskell and use C instead.
this but unironically.

Swift

true, forgot about swift which is actually legit.
only thing is that without the apple APIs it doesn't have "batteries included".

but its still a very good language imo. from the same guy that made LLVM could only be good desu

not only this but the trannies and SJWs are actually just a vocal minority, they dont actually do any work.
in the end its always the white guys that have to carry everything..

personally i like rust, just avoid the community which (actual ironic in the true sense of the word) is very toxic and full of zealots.

based and rationalpilled. Rust is pretty great

Swift would be great if IBM or whoever made an effort to improve the Linux developer experience. Unfortunately, with how tightly Apple controls the language it seems unlikely.

audi

Go is not oop

>without trannies and with no redditors
for now

I still don't like the syntax. Just terrible.

>the coc only applies to contributions to Rust itself
Oh great, so I can never influence the direction of the shitty language you want me to adopt.
>not only this but the trannies and SJWs are actually just a vocal minority, they dont actually do any work.
Vocal minorities have shoved CoCs into every single major open source project now. You're acting like they're no threat.
>in the end its always the white guys that have to carry everything..
And if you use Rust, trannies will control the fruit of your work.
>personally i like rust
Even without the trannies I just don't get what the fuck is the point of the language when C++ has everything you need in it. The syntax is disgusting.

it's supposed to be
in practice, it isn't

>The syntax is disgusting.
Why does everyone keep saying the syntax for Rust is awful? Besides lifetime parameters using apostrophes, everything else seems fine to me, especially considering those are rare anyway. What is it that turns people off so much?

i don't get it either, i find it easily readable, even if it's a bit sigil-heavy
t. uses go, kotlin, typescript at work

Attached: 1516336617866.gif (422x392, 738K)

It's very heavy on keywords and ugly looking tokens like ::. I think it's overly explicit.

I legitimately forgot that D even existed.

Because for the first time in their life they are a forced to actually check the errors in their code. Equivalent code in POO languages would have like six layers of try catch.

Try Carp. It has a Lisp syntax.

No, borrowing is making sure a raw pointer extracted from a unique_ptr does not outlive the unique_ptr. A unique_ptr on its own is not borrowing.

Modules

baseD

That's what they should have called the betterC mode.

cute potatoes dude

and
/t
h
r
e
a
d

>finally something that tried panically changing its memory model and tries to patch on a third way
Can't bust the rust.

Read the fucking link. The core memory model remains unchanged. D is modular, and this is a new feature you can apply selectively as you wish. In other words, D will let you write C, C++, C# or Rust in different parts of your program depending on what you want.

lel ... guessing tranny OP will be getting the D tonight to celebrate.

Read the fucking post. The checker is optional, this makes it worthless, since you can not rely on other peoples libraries to be checked.

Imagine using any other language than C

Your reply just restates what I said, which is that you don't have to apply the borrow checker to your entire program, except that you are claiming it's a bad thing. There are @nogc libraries for D like code.dlang.org/packages/tanya. No reason to think there won't be @live libraries.