D

Beautiful

module mergesort;import std.traits : isOrderingComparable, isCopyable, isMutable, isArray;import std.algorithm.sorting : isSorted;private void merge(T)(ref T[] arr, ref T[] aux, in ulong lo, in ulong mid, in ulong hi) if (isOrderingComparable!T && isCopyable!T && isMutable!T)in{ debug { assert(arr[lo .. mid].isSorted); assert(arr[mid .. $].isSorted); }}out{ debug { assert(arr.isSorted); }}do{ // WARN: UNTESTED debug { assert(arr.length == 0); } foreach (ulong i; 0 .. arr.length) aux ~= arr[i]; ulong left = lo, right = mid; foreach (ulong i; lo .. hi + 1) { if (aux[mid] < aux[mid + 1]) { arr = aux; break; } if (aux[left] < aux[right]) { arr[i] = aux[left++]; } else if (aux[right] mid) { arr[i] = arr[right++]; } else { arr[i] = arr[left++]; } }}

Attached: PeMSYqY.png (1024x1024, 21.9K)

Other urls found in this thread:

cvedetails.com/vulnerability-list/
twitter.com/NSFWRedditVideo

But c++ lets me plug a custom allocator into any standard data structure. Can D do that?

I tried D in the past but got demotivated so never learned it fully. From the little that I used it it's a better language than C++: the well designed library, the built in strings, arrays and maps, all make it a very elegant and practical language... which unlike C++ is actually high level. Then again for C++ weenies anything above machine code is "high level", even assembler.

Anyway back to D, unfortunately they refuse to standardize it by way of ISO/IEC, because who needs standardization amirite? "Other languages do just fine without standardization." Yeah because they're backed by big corporations, big money, maybe even a government.

Ultimately, the philosophical problem of D is that in order to fully appreciate it you need to be an above-average C++ programmer in the first place. But if you already are, why the fuck would you leave standard C++ for what is basically an unproven language? Methinks toying around with D as if it was a hobby project (which it is) should end immediately, and the language standard should freeze its features in, let's say, ISO/IEC D20, in time to poop on C++20's party. But that's not going to happen because suddenly winning over C++ programmer's isn't the goal anymore... the goal now is having fun or whatever.

Why post this in Zig Forums instead of /prog/?

Maybe he wanted someone to read it. But it's just the new meme to push D after he got bored pushing Rust. They're both toy languages. People gave up hope for D before many anons were born so it's an unusual choice.

Rust is already synonymous with "meme shit", but D is more unheard of and more similar to C++ so it's easier to push without getting instantly filtered.

What were the reasons? I am curious because I haven't followed D history closely.

I feel like even just reading it requires too big investment. Even perl scripts aren't that hard to read once you get basic grasp of arrays, hashes, () magic and $_.

What is a `toy language`?

And what is a `meme shit`?

Take another course in English, pajeet.

on what?

What are ``faggot quotes''?

It was pushed as an upcoming systems language and they tried to meme it on slashdot around 2000 to C programmers as the future of C then it became clear it was GCed and the GC wasn't really optional. That instantly killed it for systems work, and it wasn't competitive with the large investment people had in perl or Java, so it had no audience, regardless of other technical issues. They should have called it Y.

Anything but C++ or Java
If your lang doesn't guarantee a job, it's an internet joke.

If your lang doesn't guarantee memory safety, feraless concurrency and zero-cost abstractions, it's an internet joke.

If you need safety nets, you're a joke.

You're right. Let's remove the safety nets from guns.
Also, btw: cvedetails.com/vulnerability-list/

One takes a live, the other exposes the codemonkey as a retard. They're not even remotely on the same level.

You're right. I'm so stupid. Please continue with your LARPing. C is the best and most perfectest language btw.

lol

lol

My argument is still standing unchallenged
You just threw some retarded ad-hominems at it.

Ok kid. You go on and LARP some more.

I can see the japanese flag on your asshole glowing from over here.

Another quality discussion spawned by language of equal quality.

I RIIR: fn mergesort(slice: &mut [impl Ord]) { if slice.len() < 2 { return; } let mut mid = slice.len() / 2; mergesort(&mut slice[..mid]); mergesort(&mut slice[mid..]); let mut a = 0; let mut b = mid; while a < mid && b < slice.len() { if slice[a]

They should in the near future, but currently it is not ripe enough for them to pick.
Same goes for Nim, Python, Haskell and other languages that has potential.

DMD (the original compiler) was proprietary, it only recently became free software hence why it's been catching on now.

You write shit code I guarantee it.

No programming language can guarantee you a job if you aren't good enough. Sorry to break it to you.

t. code artisan

Breathtakingly beautiful. Good work, Klabnikposter.

It's not that I never make bugs.
Thorough testing is a lost art.
Now every faggot just waits for the bug reports from the users.

Why did you have to bring up those memories user?