What is the point of $(pic_related)?

I can understand that Golang is for brainlets that want to learn the new hyped up language that is inevitably going to get cancelled by Google(like 90% of the Google projects) as quickly as possible. However, what is even the point of Rust? Especially when C++ already has every feature that Rust has. You want safe functional code? Haskell is your friend, the most advanced programming language(with the most advanced compiler - GHC) in the world. Haskell is also SJW-free, so there's absolutely no reason to learn that ugly syntax of Rust. It's dead on arrival.

Attached: 1200px-Rust_programming_language_black_logo.svg.png (1200x1200, 56K)

Other urls found in this thread:

rust-lang.org/en-US/friends.html
en.cppreference.com/w/cpp/header/type_traits
youtube.com/watch?v=iSmkqocn0oQ
forum.dlang.org/thread/[email protected]
users.rust-lang.org/t/serde-and-serde-json-1-0-0-released/10466/5
github.com/serde-rs/json
ziglang.org/
twitter.com/AnonBabble

>C++ already has every feature that Rust has.
Where is trait based generics?
Where is borrow checking?
Where is lifetime semantics?

>inb4 just use a third party static analyzer bro xDD
If that's the case where is C++'s standard build system?
Where is C++'s standard package manager?
Where is C++'s standard testing/docgen tool?

>muh SJW
>muh syntax
LOL because Jow Forums is never able to fathom any technical debate so they care about people and the looks, ironically like SJWs themselves. Sad.

Attached: Screenshot_2018-09-26 g - dpt - Daily Programming Thread - Technology - 4chan.png (3328x740, 147K)

How fast is Haskell?

>I can't use it unless it's "standard"
>Even though the language itself lacks a standard and every useful feature is unstable
Rustlets really are retarded huh

Rust was a test to see what kind of madness the open source community would put up with. The language wasn't the point, testing out ideological warfare via identity politics was the reason for creating Rust. The current attack on Linux is a direct result of the success they had in creating the Rust community as a weapon.

Fpbp

It's weird Ada without the bloat.

anthoer retarded Rustbashing thread with adding the word "SJW", but hey, at least we both agree that Golang is shit


fuck you and fuck your useless haskell, even the guy who authored it said it's useless


also Rust is dead? kek, this is only 3 years of launching 1.0, tell me who uses your 30 year old Haskell

rust-lang.org/en-US/friends.html

The only project that uses rust commercially is Firefox and that's filled with memory leaks. Compare that to c++

The rust borrow checker adds nothing that you couldn't get with design by contract

Web renderer has no leaks. In fact the new web renderer is the reason why Firefox is less shit these days. FF is a mix of Rust C++ and ASM. The leaks are from C++.

Bad timing, OP. I'm free and you are again spreading unfair FUD.
Your thread is ruined.

>The only project that uses rust commercially is Firefox
I just gave you a link with all companies that use it in production you retarded shithead

Couldn't have said better myself.
If you are looking for a discussion, the thread is over in the very first post.

Standardization is needed where there are millions of different implementations which Rust doesn't have; However there are 30 (afaik) different build systems in C++ and all of them looks like a joke compared to cargo. Cope.

>and all of them looks like a joke
MSVC projects are neat though

>microtrash garbage
Yeah no. Last thing I ever want is Microsoft to inject telemetry module into the binaries built with it.

It's slow as molasses, like python, it's not intended for speed, just for user productivity.

It's a language no one uses, and for a good reason. Python already exists..

>C++ already has every feature that Rust has. You want safe functional code? Haskell is your friend
what a joke

having a standard build system/package manager/testing/docgen system that is actually good is important if you want to use packages/librarys/programs from the internet without learning a new build system for every one of them
>b-but once you learn make/cmake/qmake/premake/shake/scons/gradle/ant/autotools/ninja/tup it's all good

>if rust is so popular why hasn't everybody switched everything to it within 2 years
dropbox have been using rust for years, cloudflare is using rust, at least two game studios have switched to rust, npm is using rust, a bunch of linux containers/vm stuff is switching to rust, ripgrep is by far the best and fastest grep alternative in years and is incredibly popular to the point that it's included in things like vscode
also only parts of firefox are written in rust and the leaky parts aren't rust

Haskell is pretty slow relative to C, but blazing fast compared to Python. Haskell's in the same bracket as Go and Java which is impressive considering how abstract Haskell code usually is.

So that people can point and laugh at it while nervously checking to see if Jai will EVER BE FUCKING FINISHED

Attached: IMG_20180724_152519.jpg (340x328, 13K)

>legitimately falling for JAI scam

not slow

>Jai
Just fucking use Odin already

Attached: logo-slim.png (501x261, 72K)

I don't think you've programmed C++ because a lot of these things exist

>trait based generics
C++ has this
en.cppreference.com/w/cpp/header/type_traits

>borrow checking
not needed, and nobody even fucking wants it

>lifetime semantics
they exist, in the form of:
explicit ctor / dtor calls with new / delete
implicit ctor / dtor calls with RAII and descoping
smart pointers

>C++ standard build system
make

Python is kinda funny lang...

It's just popular, has no real advantages...

it has operator overloading which most scripting languages don't

I don't think you've programmed Rust because you don't know what any of those mean.

rust uses msvc toolchain on windows...

it gives you the option

The truth is that everyone in here is retarded, the only thing that matters is who compiles the code the rest is just syntax so apes can understand it.
I just code in C and use a self made parser with complex code snippets that target all those meme muu leaks and muu complicated stuff things, code looks beautiful and performance is great

>lifetime semantics
>"explicit c/dtor"
>"RAII"
>"smart pointers"

Attached: 1538068292820.jpg (442x500, 8K)

It's branding, nothing more.

>c++
The programming equivalent of a sports car from the 70s. Fast, powerful and reliable but no safety features or power steering/breaks.

Fun to screw around with in toy projects or to service or extend an existing codebase, but no one would try to build something from scratch with it today.

Much like the 70s analogy, only a handful of true masters are still working today. Most people will never master it so it makes sense to invent something new to take its place.

>haskell
Literally why tier. It's an academic project that somehow escaped to the mainstream. GHC is massive as well, so portability is always going to be an issue.

youtube.com/watch?v=iSmkqocn0oQ

90% of what Jai does can already be done in D.

forum.dlang.org/thread/[email protected]

>what is even the point of Rust? Especially when C++ already has every feature that Rust has.

That's exactly the point of Rust. C++ does literally everything and as a billion features, and that's the problem.

Rust is basically a small version of C++, it has 1 single way to deal with memory allocation based on the RAII pattern (no pointer-smart-pointer-weird-malloc-bullshit), a clear subset of Functional Programming features. All well explained on a single book with a cute crab on the cover.

just playing with rust it was really easy getting opengl, imgui, actix, etc up and running, error handling and control flow was pleasant and expressive, if i had need for all that performance i'd consider it since i'm not confident i could write robust c++

Jai doesn't even do anything C++ doesn't apart from compile-time execution

> vs code
OH so it has telemetry now. Cool

based retardposter

Type safety, memory safety and real, actual zero cost abstractions that allow you to abstract as much as you want without incurring the performance cost this normally has.

Rust macros can generate code by looking at and modifying the ast, so you get code that can get just as fast as hand-optimized C code, except it will be trivially reusable in different situations.
Take a look at Serde, for example. It beats even the fastest C and C++ libraries. There's simply no way for these languages to compete with it, since they don't have macros that powerful and instead have to rely on expensive runtime checks.

users.rust-lang.org/t/serde-and-serde-json-1-0-0-released/10466/5
github.com/serde-rs/json

Code generation isn't magic. You can generate code in any language. Lots of firms generate Java instead of writing it directly. The Go toolchain even has a built-in code generation system. There's no reason why you couldn't generate C.

WTF are you talking about?

Then you don't write C anymore. Then you write something that generates C.
The preprocessor is way too limited to compete with rust macros, so you'd need to create an entirely new language.
And that new language has to be able to parse and understand the C itself, so it can actually generate code.
And you'd have to make up so many new syntaxes and structures to adequately describe the structure and function of the code that the language you would end up with would hardly look anything like C.

Having code generation integrated into the programming languages themselves is the future. Moore's law basically ended, so companies now have to once again focus on writing well performing code because they don't want to drown in server costs to host some memey python or node code that's 100x slower and memory hungry than an optimized program would be. And since modern programs are way too big and programmers way too scarce that every line of code can just be hand-optimized C or assembler code, code generation is the answer.
I, for one, welcome our new type safety and zero cost abstraction overlords.

The fucking retard is probably talking about literal C AST generators lmao

What is this Jai language and why would anyone really care?

Jai is a total scam. It's a hypothetical programming language that has no compilers, only promises. Shilled by the most retarded autists in the world of programmers.

A meme language so memey that it doesn't even exist.
No wonder Jow Forums loves it.
There's no better way not to program than with a language you can't program with.

No it isn't. Stop just saying shit.

It is nearly identical in terms of C and even marginally faster in some cases.

>like python
You don't know anything about programming.

Python is interpreted, it is anywhere from 50x to 300x slower than C. There is not situation where any compiled language comes close to being as slow as Python.

>It is nearly identical in terms of C
[citation needed]

Rust is vry very fast, has amazing multithreading / async support and lets you write anything safely.
Writing a web project in C? Painful, but easy in rust thanks to things like actix or hyper.

It's honestly the best language out right now, the only thing preventing me from switching to it for work is that it doesnt have as large of an ecosystem as Java yet.

>xml
Yeah no

>Jai is a total scam. It's a hypothetical programming language that has no compilers, only promises
it has a working compiler

>Rust is vry very fast, has amazing multithreading / async support and lets you write anything safely.
You can totally write async and multithreaded stuff in C++ easily

The compiler is a lie. It doesn't exist.
>muh demo videos
Then where is the code?

jon blow livestreams himself programming a game in jai

Not really

Where is the code?

To clarify, c++ does not even have continuations

i've never programmed rust either. can you explain what lifetime semantics and borrow checking does, that can't be accomplished with reference counting?

>Especially when C++ already has every feature that Rust has.
The problem is that C++ doesn't enforce using those features. I am tired of having to deal with memory leaks because my company doesn't want to use smart pointers.

I like Rust, and see myself switching in a few years, once const generics an a few other features become stable. However:

>Where is trait based generics?
-fconcepts

>Where is borrow checking?
>Where is lifetime semantics?
Don't see myself needing it with proper use of containers/smart_ptr's + no raw owning ptrs.

>If that's the case where is C++'s standard build system?
>Where is C++'s standard package manager?
>Where is C++'s standard testing/docgen tool?
I use whatever I want. For now it is conan/cmake/catch2

Reference counting manages the heap at runtime.
Borrow checking analyzes the stack at compile time.
Rust actually has both.

it's c++ for trannies and brown people

ref counting has runtime costs associated with it, it will kill your performance

rust's borrow checking happens at compile time, no performance cost
Rust is by default:
faster than c++
safer than c++

Borrow checking is a compiletime mechanism for ensuring that use-after-frees don't occur. Essentially it means that all your pointers are annotated so that they don't outlive their pointees, and this annotation is performed and checked at compile time.
Borrow checking is the formalization of lifetime semantics.

Rust's borrow checking rules are too conservative, especially as they pertain to mutability. Nominally there is no runtime cost, but working around the borrow checker means adding Rc or RefCell or .clone() where you wouldn't need to use them in C++. That makes it slower.

>ref counting has runtime costs associated with it, it will kill your performance
not really

>It is nearly identical in terms of C and even marginally faster in some cases

Attached: 1533241891337.jpg (755x517, 99K)

You absolutely do not .clone more in Rust than in C++. I've programmed in C++ professionally for four years, and have used Rust since before their 1.0 release. One of Rust's great benefits is ease of avoiding copying memory, allowing you to instead use raw pointers (checked at compile time by Rust for safety, but with no runtime penalty like C++ smart pointers) where you would not do so in C++.

And when you need to do something the Rust compiler can't check, you can use unchecked raw pointers in Rust, which are the same as standard pointers in C++. Rust then encourages you to create a safe wrapper API to express the ownership semantics that would be encoded as API comments in C++ (ie, whether a returned pointer can outlive the object that returned it). But even when using unsafe Rust with raw pointers, you still get Rust's expression-orientation, pattern matching, and other nice features.

for me, it's Zig

ziglang.org/