>C/C++ as a core language +Tons of resources and large community +Faster/est binaries -Codebase is ugly, leads to shitty design (with C++) -Slowly becomes unmaintainable -Close to 0 productivity (with C) -No memory safety
>Rust +Binaries just as fast as C++ +Tons of features +Maintainable codebase with package managers and Modules, strict checks +Close to 0 memory leaks and corruptions -Much less community -Much less libraries unless you are calling C libraries
>D +Productive as fuck +Small and yet mature community +Libraries better than Rust -Slow binaries -Almost no memory safety (not as much as C/C++)
>+Close to 0 memory leaks and corruptions You shouldn't be leaking memory in C++ either if you're using RAII.
>+Tons of features Describes C++14 as well.
Nathan Kelly
I'd go with C++. I don't like few things in rust, like '!' in println!() or variables being constant by default. D is just slow and Dead. C is functional, so writing anything large in it is hard.
Zachary Perry
Shii best car
Caleb Watson
electron app with Angular 2 frontend and custom C++ nodejs native plugins for any heavy lifting :^)
Jeremiah Howard
>C is functional What?
Josiah Green
I meant that it uses functions to do everything, and it doesn't have objects. >inb4 c with classes It still uses functions to do everything with those objects.
It matters not, because - even if D or Rust actually become good in the future - the thing that is cancerous in all kinds of flavor is the GUI library. It's all garbage. Don't even try to prove me wrong; you can't.
Levi Nguyen
>C is functional
Angel Robinson
Seriously?
Christopher Torres
nyanko is love
Julian Carter
See
Dylan James
Every important - meaning clang and gcc has, though.
Lucas Ramirez
You have no idea what you're talking about. C using functions in no way makes it a functional programming language. C is imperative and structural.
Jackson Taylor
Ok then, my bad, but the point still stands. C doesn't have true objects, making it hard to write large desktop apps.
Mason Campbell
C#
Jacob Perry
>C doesn't have true objects, making it hard to write large desktop apps. >I don't know how to design non-POO systems >Therefore it cannot be done
Josiah Reed
D's dead. Not sure why it keeps on coming up. I'd do C/C++.
The only two compilers that matter support all of C++14.
Jaxon Robinson
>hard == impossible You could make it only with C, but it's easier to design desktop apps with C++ or any higher level language, that's a fact. Prove me wrong. Protip: you can't.
Tyler Rodriguez
Is Rust better than Go?
Xavier Hughes
Prove yourself right, idiot. There are other (and frankly, better) ways to design programs. Procedural programming exists, and is the more obvious and natural way to program imperatively.
Asher Edwards
u hav never writen a program prov wron letip u cant xd
Isaac Bailey
>not building your own C++14 compatible divine intellect compiler as a white man ??????????????
Isaac Hernandez
Script kiddies get out
Julian Gomez
>Rust >+Binaries just as fast as C++ I wish this myth would die. Only bare metal languages can compete with other bare metal languages.
Julian Long
D also has the con of being forced-gc'd OR forced-mem leaking (because of the std lib). Because of that I consider it currently downright unusable. When they fix it, I'll consider it not worth the effort to learn because its advantages over C++ are just too subtle while having distinct disadvantages.
Large desktop applications come in many flavors. If you are mostly designing brand-new concepts, I'd go with rust because you couldn't leverage C++ libraries anyway. If you're mostly tying together many non-trivial services, I'd probably prefer C++, but still note that rust is a viable option in that scenario thanks to its FFI.
Ian Perry
It's actually larger than e.g. haskell's or lisp's, but it still is small compared to the likes of java's, python's, or C++'s.
Angel Diaz
See e.g.
Charles Hernandez
>-Slowly becomes unmaintainable >-Close to 0 productivity (with C) >-No memory safety ??
Evan Moore
In what sense is Rust not a "bare metal language"?
Caleb Perez
because its an oxide
Michael Davis
It's a safety language.
Oliver Edwards
Please explain what you mean by "bare metal language". Because none of the definitions that come to mind for me have anything to do with safety.
Aiden Gutierrez
If you have to explicitly use and maintain usage through pointer objects, you're really just passing objects by value which use RAII to slowly manage memory (refcounting is slower than GC). It's not really safe memory management in the sense used here, and you still have issues whenever calling out to foreign code because they won't accept your object.
Productivity in modern C++ is actually pretty good, but still lacking due to the obtuse syntax which is a result of attempts at backward-compatibility. It makes it clunky and verbose where languages built from the ground up with modern features don't need to be. I think trying to compare it with C in that regard is misguided, though, it's definitely a lot better.
Because of verbosity, ancestral features (such as #include and C-style macros in general) and feature creep, C++ codebases become less maintainable with every line of code added to them. Other languages may maintain the same maintainability level indefinitely.
Connor Thomas
Go can't even compete, rust is faster than C++
Gabriel Brooks
This user gets it. D has a great syntax and it's much more readable and maintainable. Small D programs may not have the best performance but as tge application goes larger D keeps the codebase clean, easier for refactoring and human eye friendly. Which is a big wise plus
Isaac Lewis
If you're worried about C being unsafe just get some safe libraries, or make them yourself. You can replicate C++ vectors in C in like 5 minutes, write functions for handling pointers that won't allow you to be a retard with them, whatever you need you can find online or just write yourself.
Except that's wrong. Methods are NOT part of the object data-wise. When you create a method on an object, it is basically syntactic sugar for You can verify this yourself in C++ by just simply looking at the assembly. Of course, if you want a virtual method, then it has to use functions pointers via a vtable, which i literally addressed in that same post just without a vtable.
Jayden Mitchell
True, but the one of the good things about Python is its large ecosystem.
Luke Allen
I won't argue implementation details, but I will ask : isn't the point of OOP to relate a set of data and a set of methods that naturally modify that data in a way that humans can understand? If that's the case, why is it wrong to have function pointers in your struct? Isn't that just another way to do OOP?
Justin Foster
I think you mean procedural
Ian Walker
It's an inefficient way to do OOP. If you want to do it that way sure, I won't stop you. But it's just unnecesary data bloat and instructions cycles (when copying structs, and actually calling the methods, for example) to me. I'd rather just have normal functions that act like methods. They provide basically the same thing with more efficiency.
Jonathan Gomez
I might be talking out of my expertise here, but in the given example of a setter method, can't I call foo_method with a void* pointer instead of a struct foo *? Which would make this way unsafe
David Roberts
Yes? so what? Don't do that then. Use Rust if you're concerned about safety.
Ryan Allen
>there's no such thing as hackers who decompile binaries to compromise systems.
fuck off
Josiah Parker
Using Rust won't prevent that from happening.
Jordan Powell
Here's a better summary: >C++ Support >Rust Safety >D Productivity
Alexander Moore
OP here fuck support; I want both safety and productivity. I'd pick D but D is kinda slow.
Jackson Cooper
>just as fast as C
more like 4-5 times slower. Which is fine if you're running a simple program that executes on the order of seconds, but not if you're running something that needs to execute on the order of milliseconds or hours.
Apparently there's a lot of data in my ass, since we seem to be using the same source.
Jose Gonzalez
Idiot
Brayden Rodriguez
No, you're using an outdated source from 2 years ago, even in your source it's nowhere near 4-5 times slower, and in the recent update Rust is the closest to C out there.
Stop posting this shit, the programs are not identical and the task is too small to be a measure of anything.
Kayden Martinez
Point still stands
Ayden Taylor
Noone else took notice of you, user. But just know that I did. I saw when noone else wanted to see. Those who were too cought up in the heated debates bellowing loudly may have turned a blind eye to the humble word play expressed by your heart; by your soul, but I didn't. I listened when noone else wanted to listen. The gloomy sands of life that will eventually fade from every persons possession was momentarily frozen. It was akin to a chance encounter with the humble dandelion struggling to break free from a sea of cold, melancholy cement. For even though the dandelion's colors it may not boast, through time and space will forever be it's underrated post.
Wyatt Hall
Yes but it's NOT C or anywhere close to C. 10-30% is not acceptable when you always have the option of using C and even in some fucked up land where you must use C++, you don't have to learn an entirely new language to do it.
Zachary Wilson
You sound extremely butthurt, user
Samuel Johnson
...
Brody Foster
Happy to trade 10-30% performance gain over safety and ease of use/maintaining
Anthony Russell
So in two years Rust topped C++ and the closest to C? Fascinating. Anything that competes with C++ is fast in my book, if it is faster than C++ it's more performance than I wanted
Matthew Morales
Rust is nice like that. But the language is very big to master easily.
Easton Powell
C++. Everything with C++ is established, more or less, and way more people use it. Arguably the best widget library, Qt, works natively with C++. >Rust It's more difficult to write, and not many people use it. Writing correct C++ code is way faster than Rust anyways and it's not even that hard. It also attracts SJWs, which are to be avoided at all costs if you want to get anything done. >D No one uses D, it's slow as fuck, and it has a GC. Instantly dropped. >C Not that great for desktop programs.
Ryan James
Rust is currently faster than C++
Owen Brown
>easy = good
Anthony Mitchell
Not by that much it looks like, oh well. It's easier to squeeze every last bit of performance out of C++ than Rust, i'd imagine. There are still loads of other reasons not to use Rust.
Asher Thomas
What is the point of this thread? Just use haskell people
Jaxson Moore
>What did he mean by this?
Parker Allen
>discuss >No flame wars >Posts biased opinions
Yeah ok op. You clearly just want the answer.
Liam Moore
Learn to read the thread
Jace Scott
>biased opinions I think they are agreed on facts.
Oliver Ramirez
>It matters not, because - even if D or Rust actually become good in the future - the thing that is cancerous in all kinds of flavor is the GUI library. It's all garbage. I came to tell the same
Gabriel Garcia
bogpill me on Rust GUIs vs C GUIs
Ayden Ramirez
That question does not make any sense
Owen Morgan
Who writes GUIs in 2017 tho?
Julian Stewart
Pleb here. How can I write a GUI library for X or Wayland?
Owen Morgan
Safe code in C literally does not exist and if you're not going to use any of C's libraries then you might as well use a sane language instead of the antiquated garbage that is C. Hell, writing safe ASM is literally easier than writing safe C.
Juan Thompson
Nah, because rust is also the more productive of the 3.
Easton Bell
>thousands of different ways of doing the same thing
David Davis
The language is actually smaller than C itself, but the intricacies of the borrow semantics take time to master for sure.
Cooper Martin
Every coder who needs their code to be used by an end "USER" unless there some other coder who does it for them.
>bogpill me on Rust GUIs vs C GUIs Never used Rust GUI. Only mess with Qt Framework in C++. It was good but when i compare it with Web GUIs, it feels like all Desktop GUIs are centuries backward.