What's Sup Forums's opinion on this language? Is Rust better? Is it worth learning?

What's Sup Forums's opinion on this language? Is Rust better? Is it worth learning?

Other urls found in this thread:

youtube.com/watch?v=Uocesohc6Z0
doc.rust-lang.org/book/first-edition/trait-objects.html
benchmarksgame.alioth.debian.org/u64q/go.html
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=rust
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=gpp
news.ycombinator.com/item?id=9392131
enyo.de/fw/notes/ada-type-safety.html
golang.org/doc/faq#runtime
twitter.com/NSFWRedditVideo

All languages newer than C are equally bad.

Probably bait but I'll answer. I'm actually looking for C replacement. C++ is an abomination and there are no words in any language which could describe how much I hate it. Go is actually very nice but garbage collector and Google botnet. Rust seems a bit like a meme to me.

fpbp

They are all better than C.
I fear, it had its chance. One chance, user.

>I'm actually looking for C replacement.
The language that replaces all other languages can never be replaced.
Maybe you should improve your skill with C instead of thinking the grass is greener and pining for a future that won't arrive.

>Rust seems a bit like a meme to me.

Why do you care if a language seems a bit like a meme?

>getting good at C makes it tolerable

There's no problem with C that can't be fixed by improving your skill as a programmer.
Anyone who says otherwise is spreading memes.

>[bait.jpg]

Amazing compiler shit language. The creators don't like the idea of people contributing. They had broken string split someone fixed it within a day the devs reverted the change. Then a few days later released their own broken version. Look at the compiler and learn proper compiler design from it but other than that its got nothing.

>The creators don't like the idea of people contributing
Me neither.

So the only one language left for me is Rust. Breddy sad.

Rust is not an option.

You don't seem to understand of course its normal to make sure the stability is not affected but that doesn't apply here the language is extremely unstable and the fact every update completely butchers legacy code doesn't help

Why? Rust is like Go without a purpose. A new language should solve a problem go was made for concurrency which it does really well. What does go do? What does it solve ?

So if D is unstable and therefore unfit for professional work. The only valid replacements for C are C++ or Rust. I hate C++ I tried it and I hate it. I tried Go. I like it, I really do but I cannot wrap my head around why did they put the GC in it. Then it's probably only Rust for me.

What does rust*** do? , what does it solve ?

Rust is not for you. Remain loyal to C.

If Rust is not minimalistic than you are right. That's why I like C and Go. Fuck all these Haskell and C++ faggots.

*then
Fuck I hate it when I made this mistake.

>code example on homepage
>C++ style auto keyword
Nope.
Such a verbose way for something that's supposed to reduce verbosity.

>Rust is like Go without a purpose.
Actually Rust is unlike golang with a purpose, because it ensures thread-safety and memory safety, whereas every golang program could be replaced by a Java program.
Golang exists for political reasons only in the first place, when Oracle sued Google.

>thread-safety and memory safety
These are problems you solve with tooling, not by inventing languages.
Where is Rust's tooling?

>These are problems you solve with tooling, not by inventing languages.
Bullshit.
>Where is Rust's tooling?
In it's compiler, where it belongs and by extension probably available in Rust IDEs and text editor plugins.

>four characters that can often be omitted
>verbose
how's your fizzbuzz going?

Golang solves server load problems by allowing for concurrently and being able to manage it really well. Java is incapable of this. It was a proper replacement for nodejs. Although as you said most modern go applications can be replaced it still has a purpose it was able to solve really well. Rust solves issues that do not need a new language to solve but better tooling and knowledge of the language.

It's longer than writing "int"!
Which is what is used in the example.

It's fucking retarded.

Classic Cfag delusions

If you use 'auto' to replace 'int' you're a shit developer and shouldn't be allowed to touch c++

If I remember correctly they marketed Go as a system programming language at first. I can hardly imagine system programming without manual memory management. But I guess they've changed their goals at some point.

Link

I didn't write the example.

I know this from experience, was forced to work with the shit language

>So if D is unstable and therefore unfit for professional work
It's not, the lead devs are big on backwards compatibility

Also for tasks where GC makes sense I would use C#. Call me brainlet, Pajeet or Microsoft shill but that language is surprisingly good. Biggest problem is that it is locked to fucking Windows.

>Java is incapable of this.
That's wrong. Beginner mistake.

>Rust solves issues that do not need a new language to solve.
If nothing else, history should have shown you the following: Whenever a feature can be gracefully put into the compiler, like in Rusts case, it's way better than library and external tooling equivalents.
Simple example: C with crippled text replacements vs languages with proper metaprogramming.

And as for
>just knowledge of the language, see

Okay, but surely you can link a forum post or PR where this happened

>I like rust because it compensates for my lack of discipline
youtube.com/watch?v=Uocesohc6Z0

meme language for meme-tier developers.

Rust has been rated stackoverflows favorite language two years in a row and is the reason why firefox quantum is so fast.

>Simple example: C with crippled text replacements vs languages with proper metaprogramming.
But history taught us that the latter loses.

>1.001x faster
>breaks everything

could you at least tell what example you're talking about?

>But history taught us that the latter loses.
Welcome back to reality, where C++ is growing, JVM and CLR based languages with metaprogramming rule company environments and more and C is shrinking.

And yes, even Java has more metaprogramming than C.

And also, since you rightfully leash at Lisp, that is because it hasn't anything else to offer.

dlang.org

Go, as a statically typed GC language running on VM, isn't a competitor to Rust or its ilk. Go is a competitor to Java and Ocaml, and apart from having fewer features and focusing on a clean concurrent routine implementation, it doesn't offer anything different.

>These are problems you solve with tooling, not by inventing languages.
These are problems you used to have to solve with tooling. Type systems, including techniques Rust uses like affine typing to realize the idea of there only being one owner, have gotten more robust since the late 60s.

As far as I know, Rust is the only non-proof-of-concept language with a minimal runtime and no GC that's actually type safe in the sense that safety behavior like absence of null references is evident syntactically and at compile time. Rust bakes in the ownership idioms that C++ expects you to enforce on your own (and even mature programmers often fail to in practice) and has a proper module system and package manager.

There are problems Rust's type system alone cannot solve, like lock-free concurrency, but these are:
1. rare in practice
2. hard enough to solve that no mature, publicly available tools exist in any language
2. could be created more easily for Rust than eg: C++ because of the absence of things like dynamic dispatch and template metaprogramming.

Granted there are tools that accomplish similar things to Rust in C/C++ (like Frama-C), but unless you need to use C, there is no benefit in convenience. And most are proprietary.

If you need stronger properties than Rust should give, you need to use an automated theorem prover that performs code generation like Coq.

>Where is Rust's tooling?
Being built out. That's Mozilla's priority right now.

inb4 plebian non-technical criticisms.

>i'm a babby and have no discipline

Both Walter Bright and Andrei Alexandresu say that D does not replace C++ nor does it replace Java, so its designed for a space in between C++ and Java which is a programming space no one needs or uses

He's a Mozilla dev.
They never managed to get memory leaks under control.

>1 retard means the entire language is a meme

underrated answer, however

>because of the absence of things like dynamic dispatch
doc.rust-lang.org/book/first-edition/trait-objects.html

you're either retarded or need to visit an ophthalmologist

>implying you have the discipline to write something substantial in C
you don't

>Go, as a statically typed GC language running on VM, isn't a competitor to Rust or its ilk
Go does not run on any VM, it compiles to a binary on whatever platform

There is a tiny runtime in every such binary. That's why even Hello World is so fucking huge.

every programming language has a runtime dumbass, even Rust

Runtime =/= VM

And the reason Go binaries are perceived as large is because it statically links and doesn't strip debugging symbols by default.

> I take pride in having learned to use leaky abstractions
Fine, but why not write assembly then? For what it's worth, I know C++ fine; I don't particularly like having to define five constructor/destructors every time I want to manage memory. I also don't think having to write std::pair::first() every time I want to left-project a (possibly null) product type (a very simple idea in type theory that C++ devs seem not to grasp) proves I have a high IQ.

I have no relationship with Mozilla and haven't contributed to any of their products, but believe what comforts you.

You're right. I stand corrected. In the general case, it looks like you have to do what you usually do in the presence of dynamic dispatch, which is model subtype instances in an abstract domain. This is fairy standard, but it makes the problem harder.

>Go, as a statically typed GC language running on VM
>language running on VM
>on VM
Can you begin to educate yourself before spouting B.S.? There's no equivalent in the Go world to anything like the JVM or the CLR. There's no runtime to speak of, other than the minimal subset of imported packages that's actually USED by YOUR code, being STATICALLY LINKED into your static binary. If you don't do any cgo ffi yourself, Go binaries are dependency-free and will just-werk on their respective target arch/os.

The "runtime" package you can (or not) import refers to your program's run-time. There's no JIT and no VM and no "common language runtime" etc.

Also the GC has been impressively performant compared to the likes of .NET and JVM from the outset and only gotten faster and faster all the time.

Why? Because Go will live or die by its performance in the "real-time servers" world.

>There's no runtime to speak of
What handles garbage collection and go routines?

There is no JVM analogue for Go. I think my point basically survives this point. You can compile Java to assembly using GCC. Ditto C# with Mono AOT and Ocaml with its compiler. They all need garbage collectors/memory managers even if your target platform is assembly. JVM is Java's main target because the Java people wanted Java blobs to work on all platforms. But even in the absence of something like the JVM, Go is more similar performance-wise and tradeoff-wise to Java than to C++, because of GC:
benchmarksgame.alioth.debian.org/u64q/go.html
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=rust
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=gpp

If you really want something Java-like without generics for writing server infrastructure quickly, Go might serve your needs. It will never replace C++ for new projects with its current design in a way Rust could.

All this fucking about and nobody mentions Ada. The absolute state of nu-Sup Forums.

Same category as Java and Go.

The only "discipline" that should go into programming is trying to find the most reaonsable and efficient code for the given situation. That doesn't mean constantly worrying about memory when the language can do it for you.

>posts benchmarks of programs that allocate memory (read: create garbage) in a tight loop
>buhhh go is slow
you wouldn't call malloc in a tight loop

>It will never replace C++ for new projects
it has for me

>without generics
every fucking time

there is a runtime in a sense: the scheduler

>Go, as a statically typed GC language running on VM
yet more proof that anti-go shitposters know nothing and haven't used the language in question

It's safer than Rust, but isn't infected with any of the faggotry.

It needs a fat run time for all its safety features unlike Rust.

Rust needs a fat runtime for garbage collection, bounds checking, type checking, and green thread management, same as Go.

Source: your ass.
But this is a pointless argument because I'm in the middle of nowhere phoneposting.

auto isn't intended for replacing int. It's intended to replace things like std::function, which not only are more verbose, but require casting closures to a coarser type. The concrete type of a generic unboxed lambda in C++ is horribly complex and sometimes undecidable at compile time, so you can't be expected to know its type. Casting it to std::function or a function pointer is possible but it uses up extra memory, prevents inlining, and adds indirection.

Just because it basically bundles the VM in the binary doesn't mean that isn't an accurate model of its execution process.

> garbage collection
Rust produces no garbage and doesn't need a GC as you'd discover had you spent 10 minutes learning what it is from its home page or by reading this thread.
> bounds checking
news.ycombinator.com/item?id=9392131
> type checking
If you use iterators as you typically should, this is erased at compile-time. It's only present when you directly index into the data structure. And if you're certain your index is value, you can use unsafe blocks, in which case the situation is more C++-like. But sure: in some cases, there are bounds checks.
> type checking
This is performed by the compiler. No type checking is performed at run time.
> green thread management
The rust standard library only targets OS-level threads. There are third party libraries for green threads. If you opt into using these, you necessarily assume that overhead, but not otherwise.
> same as Go
Not remotely.

Ada is certainly better than C and C++ (and Java and Go if you consider runtime panics forms of type unsafety as you should), but unlike Rust used without explicit unsafe blocks, it's not totally type-safe:
enyo.de/fw/notes/ada-type-safety.html

And unlike Ada, Rust has a modern FLOSS compiler, expressions as statements, a pleasant package manager and build system, and an active community outside of aerospace developing libraries for common tasks.

I'm not interested in your sales pitch. Rust isn't suited for the real world and I'm not particular about the reasons why.

D is the fastest Garbage Collected language I know and I'm fond of it.

> I don't care about technical particulars on a technical board. Empirical demonstrations and formal methods matter to me less than how I've done things in the past and what my friends think.

Best language. Fixes every problem I’ve had with statically-typed C-like languages. Outrageous performance, even with GC cycles (for scientific and raw computing applicaions, D would be ideal). Excellent modelling power; only things I’m missing are solid sum typing with a match statement/expression.

I back Rust but this is a good post. My opinion of D fans just went up.

D is good I use it all the time.

golang.org/doc/faq#runtime

Either way, rust wins.

The last thing anyone wanted from a "better C++" was a garbage collector and a standard library that relies upon it.