What does Sup Forums think of rust?

what does Sup Forums think of rust?

Other urls found in this thread:

en.wikipedia.org/wiki/Object-oriented_programming
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=gpp&lang2=java
en.wikipedia.org/wiki/Java_performance#Comparison_to_other_languages
blog.cfelde.com/2010/06/c-vs-java-performance/
twitter.com/NSFWRedditVideo

Good

More like Bust amirite

SJW shit, and not as good as D - the language so manly that it even sounds phallic.

It's shaping up well.

Ada and D are undeniably better, tbqh.

Only four languages are acceptable:
>Lisp for interpreted scripts
>C++ for standalone programs that can *actually* benefit from OOP
>C for portable standalone programs that don't need OOP (i.e. most of them)
>Assembly for the rest
Anything else is a piece of shit forced meme shilled for by dumb SJWs and makiposter weebs.

it's essentially Anal C++, only capable of being understood by C++ devs, nearly none of whom want to switch to a SJW-infested ecosystem with not enough library support or enough compiler performance.

> D
go home, walter. nobody wants your awful GC-filled "systems" programming language

Ada doesn't have anything approaching the level of Rust's borrow checker and the syntax and semantics of the language were basically designed to be as bureaucratic and uncomfortable to use as possible.

Plenty of people do, it's a very nice language with very competent people behind it (though I agree the whole GC on by default thing was a mistake, but hey, they're working on it)

I'm retarded, what's OOP?

en.wikipedia.org/wiki/Object-oriented_programming

Notwithstanding the consensus among retards, it's by far the least important feature of C++ versus C.

Obsolete Operative Protocoll

What does the 'borrow checker' give me that Ada can't?

even though RIAA isn't perfect, it's the only sane way to build certain types of sufficiently complex systems, and there's no way to get comparable compile-time checking of cleanup in C/without OOP style scoped calling of encapsulated destructors.

Compile-time checks for use-after-free errors and data races.

Unless you're using a really over-broad definition of OOP as anything supporting methods on objects, RAII / destructors don't inherently have much to do with it.

Also they don't even actually have to encapsulated in the object itself, as is the case with gcc's cleanup attribute.

Freeing variables instead of letting them go out of scope with their memory pool is indicative of poor design

Memory pools are variables themselves and get freed eventually. Putting something in a memory pool doesn't stop you from taking and passing around eventually invalid references to it (unless you're using Rust).

Also, dynamic allocation and freeing of memory is built into Ada's specification. It's not bad design; unless you're writing embedded software in many situations programs will need to recover some of the memory they're using without trashing most of the existing state of the program.

The only way you can pass around freed variables if you follow the access hierarchy and memory pool model is if you use unchecked_access, which is not bad design, it's terrible design. Most of the time, unchecked_deallocation should only be used on memory pools, when they go out of scope, since all pointers that resides in it will be gone as well.

Dynamic memory, by its nature, is unsafe, which is why high integrity systems don't use it.

Already obsolete by the time it finally hit 1.0. We have Go for writing servers, C++ and D for going fast, Ada for embedded things that need to adhere to safety standards, and C for when you just have to talk to the hardware. Rust is pointless.

Exactly.

Now picture if you didn't need to sacrifice one advantage for another or alternate between four different languages in various stages of obsolescence or feature creep whenever you wanted to switch between doing any of those things.

It's alright. Worried it'll never get out of early access, but it has great PvP.

I'm not a developer, but people usually praise Rust for its low-level approach and its security, which would (according to them) make it ideal for kernel development (and basically anything related to hardware).

No matter what they praise it for, you still need C to talk to the hardware. That will never change.

As I said I'm not a developer, but could you please quickly explain why? That sounds interesting.

C is based on how the computer actually works. The memory space is just one big array of numbers, which you can read and write using pointer manipulation. If that's not powerful enough, you can drop down to inline assembly to touch registers and CPU flags. Rust doesn't have any of that, so you can't write functions like setjmp/longjmp (the basis of exception systems) or alloca (which manipulates the stack). Computers need C.

Thank you.

> Security meme

It's just a built-in code analyzer.

If you cant use the existing VAST C/C++ tooling to assert the code "quality" and follow some project guidelines then you shouldn't even in programming.

I don't program and I don't give a shit of your assessments on my ability to program, but I've heard a guy who worked at Minatech (a French research laboratory) on a FOSS chromatographic analyzer (according to him, for a 2-years wage bound to 6 months of work) who said that "Rust at least solves some (trivial) problems".

Rust doesn't solve any problems that weren't already solved.

Just FYI the other poster is talking bullshit, you don't need C to talk to the hardware. There are operating systems which boot from assembly straight into Rust

These problems were solved, but not by C/C++.

According to him, the Rust language is still more secure than Go or other languages.

How much does your "friend" get paid by Mozilla to trick you into shilling on Taiwanese street performer message boards?

Am I supposed to reply to that?

...

You're supposed to run back to your safe space with your tail between your legs.

How the fuck is it related to a safe space? I'm asking questions and contributing about what a guy who has both a master in development and applied mathematics and a master in physics told me, are you fucking stupid?

>muh guaranteed memory safety

He needs to shut the fuck up

> Rust is a glorified linter
Wow lad, slow down. Don't change the world too fast, now.

It's a good language for applications that need to perform. Rust feels like C++ mixed together with Haskell. You get the speed of C++ and the functional features of Haskell. Libraries are still in their 0.9 phase, but are perfectly usable.
Yeah, it's a Mozilla funded project and it has some degree of SJW, but who cares? You won't notice it.

Why lisp? How does it compare to Lua or Python

>Ruby for interpreted scripts
>Go / Node for smaller web stuff
>C# / Java for standalone programs
>C only if you really really REALLY need the performance
>Elixir if you need concurrency, high reliability or a functional language


Everything that is not included here is either a meme or not worth it.

>but hey, they're working on it)

It has potential, but as long as there isn't another compiler I won't touch it for serious stuff.

As many flaws Ds model of development has that makes D unusable, more than one compiler is a thing they did right.

>>C# / Java for standalone programs
you have really no fucking clue what youre talking about kek
enjoy your hundreds of megabyte Mono and JVM bloatware

That's why I wrote "C# / Java", dummy.

C# = Everything M$ related
Java = Crossplattform


Enjoy your 10% perfromance gain with your C++::Cluster::Fuck..

Rust uses LLVM, so in theory you can swap clang for gcc. But you're right, having your programming language depending on LLVM is really dangerous.

%
>when in reality it's 2 - 3x the speedup [1]
>mfw geogebra takes 15s to start
>mfw chromium starts instantly
>mfw my statically linked, standalone c++ binary is a 1mb file
>mfw openJDK is hundreds of MB
>mfw the official java runtime on windows is unironic malware

kill yourself, pajeet
your not going to convince anybody with your bloated malware

[1] benchmarksgame.alioth.debian.org/u64q/compare.php?lang=gpp&lang2=java

kek, pajeet BTFO

golang > rust

plenty of shit compilers < one really good compiler, though..

>when in reality it's 2 - 3x the speedup [1]

"Cherry picking, the post"..

From your benchmark:
k-nucleotide: 7.15 vs 8.10 seconds (11.7 %)
regex-dna: 3.89 vs 4.56 seconds (14.7 %)
mandelbrot: 5.82 vs 7.14 seconds (18.5 %)
...

Also:
"Objectively comparing the performance of a Java program and an equivalent one written in another language such as C++ needs a carefully and thoughtfully constructed benchmark which compares programs completing identical tasks. The target platform of Java's bytecode compiler is the Java platform, and the bytecode is either interpreted or compiled into machine code by the JVM. Other compilers almost always target a specific hardware and software platform, producing machine code that will stay virtually unchanged during execution[citation needed]. Very different and hard-to-compare scenarios arise from these two different approaches: static vs. dynamic compilations and recompilations, the availability of precise information about the runtime environment and others."
>en.wikipedia.org/wiki/Java_performance#Comparison_to_other_languages

Long story short, I can show you this benchmark, you can show me that benchmark.

But fact of the matter Java got continously faster over the last two decades and no end in sigth. C++ just got a little less retarded syntax.

Look, this was 6 years ago and Java got considerably faster since then:
>blog.cfelde.com/2010/06/c-vs-java-performance/


Trololol, I just call him a pajeet and ignore the industry..

Java is everywhere, while C++ is.. what? Operating system, graphical libraries and maybe robotics?

LMAO, get a Job..

BTFO

since you've asked where C++ is being used:
- operating systems, daemons, DEs, WMs (though C is still the winner here)
- image editing (photoshop, inkscape)
- video editing (aftereffects (all adobe programs btw), maya)
- CAD (autodesk)
- web browsers (all of them: firefox, chromium, IE, edge)
- data analysis (ROOT)
- compilers (GCC, LLVM, JVM)
- machine learning (caffe, tensorflow, openNN)
- game engines and games
- mathematics (matlab, GNU octave, (mathematica))
basically, C++ is everywhere

meanwhile, where's java?
- enterprise applications where server cost is lower than the development cost
- some seldom breakthrough (geogebra, minecraft) which always comes with terrible performance

AND THE MAN COMES BACK!

>you can't AOT compile CIL to a stand alone binary

It's not so much for having another backend, but another frontend by other people with another background. To have max redundancy if one team goes full retard.

Nah, it's both equally shit.
a) can be ruined by having a cancerous reference implementation, e.g. Python, D
b) can be ruined by having the only implementation in the hands of restrictors, e.g. Ada

It's funny how many words you make for the same things I already listed:

Deamons belongs to the OS category, CAD, video editing and games belongs to the audio/graphical category..

Also for TensorFlow it's enough to know Python, as long as there are low-level code monkey like you..


As for Java, it's still the most widespread language for companies, will you argue about that one?

Most of the internet is run by Apache (written in C, not ugly C++) and NginX. Most big companies use Java for the Web, just check how the numbers for i.e. the Spring framework. Not counting the vast amount of Java Application servers that run in intranets somewhere in companies..

Face it:
Unless you do some autistic nerdom programming ("hurr, how do I optimize my rendering") nobody cares about that abomination that is called C++. It's a dying art, soon to be replaced by the Rust SJWs.

My current favorite language even though I still have more to learn

>D
The irony of D is that it wants to be a better C++ but makes the same mistakes. The language is complex as fuck, it tries to be everything.
It's like going to an ice cream shop and being asked "what flavor do you want" well actually I want all of them.

You might think this is good but it's not. It only adds to the complexity and It's a distraction. I've seen a lot of C++ programmers invent problems just so that they could use feature X.

D should have been C# without gc and the massive runtime

That way it would've easily found a spot in desktop application and gaming land.

You could easily have something like scoped pointers.

Rust has raw pointers, inline Assembly and intrinsics.

>C is based on how the computer actually works. The memory space is just one big array of numbers, which you can read and write using pointer manipulation.

That's "Folk C", the good old language of 20 years ago, when men were men and nobody cared about undefined behavior, and compilers weren't smartasses about it.

Now they are, and it's impossible for a human to write correct, complicated, strictly conformant C code anymore. Regarding your comment, you can only point inside an array or one position beyond. Otherwise even if you don't dereference the pointer it's still undefined.

Then C++ adds all its horrors and utter complexity. I'm surprised things don't explode more often.

kek'd

And I forgot to even mention weak memory models. Oh boy.

The person you're replying to is right, but I agree that optimization isn't a priority when considering that devices capacity doubles every two years and that development of million-code lines frameworks and software is pretty expensive.

It seems these questions can be solved by Go, and I suppose it will become the next industry standard. About Rust, your question is, for developing desktop-side backends (kernels, compilers, etc.), a problem it aims to solve, isn't it?

Wait what you think go will replace Java. Why?

I think it will replace Java for embedded server development because it's modern, easy to use (which would reduce development costs), decently fast, and it doesn't fuck up with your computer, with server features (that I don't understand).

Will C++17 save it from extinction?

>JavaScript for web
>Python for scripting
>C for system and embedded device
>C++ for everything else

I know the basics of Java and a decent amount of Python. Looking for a decent Swiss army knife language to learn on my own for fun projects. Any suggestions? I was looking through a Haskell book last night that looked really interesting but you guys even shit on that regularly.

Meme

I'm not a developer, sorry. (Hence, I don't know if your post isn't passive-offensive, but I'll try to answer anyway.)

According to ,
>Rust feels like C++ mixed together with Haskell. You get the speed of C++ and the functional features of Haskell. Libraries are still in their 0.9 phase, but are perfectly usable.

If you have a JAVA background, you may also be interested in Clojure, a Lisp dialect for .NET framework and JVM.

I'm not either, but programming and the different languages fascinate me. I'm hoping eventually I can make something cool but I don't have time to really focus on more than 1, so I'm looking for something I can learn in my own and a good book to go with it.

actually we need only 2 languages:
javascript for everything because it's the future
rust if you need direct hardware access

actual C is fucking retarded 60s bullshit and not even cpu makers actually make assembly stuff anymore

>Still uses header files
>Still a pain to share or use other people's code
>Still a pain to compile on different platforms
>Still no standard ABI

The biggest problems with C++ isn't the language itself but the environment.
It's an asocial language. It's the reason c++ programmers reinvent the wheel all the time. It's the reason why nobody updates its dependencies and vulnerabilities persist.

Slapping on more features on it isn't gonna save the language. C++ problems are far deeper than its feature set.

But now it's to late. Nobody is gonna change their build tools to be compatible with someone else's.

Just start from scratch instead of trying to decorate a turd.

Best language ever made so far. Not perfect (especially with regard to verbosity, and it has tco but not automatic tail call reductions, and no full inference yet). If it manages to get full inference, then rusti can move forward and rust can become a perfect option for both scripting and programming instead of just programming. If it fixes some of the verbosity (Rc::new(Box::new(Refcell::new(MutexLock::new(3)))) and the like in particular), and if it keeps otherwise improving the way it has (becoming faster and leaner), it will be the language to use for the next 50 years.

C has no standard ABI either, by the way.

I suggest you Rust, especially if you mean to be close to the hardware, but that's based on my personal tastes. You may try Go for embedded servers too.

I'm leaving, have a nice day!

Yes but C is the lingua franca because of how simple C is. If your language doesn't have a C ffi it's pretty much a non-language.

C++ is far from simple. virtual functions, parameter overloading, "this" pointer, exceptions, ect...

I know there are some impossibilities defining a complete abi for a systems programming language.

But I'm not talking about a full abi spec, but at least have some conventions for a decent ffi.

I also remember trying to turn methods pointers into proper delegates with some hacks, but it it turned out impossible because of different implementations.

>Rust
The irony of Rust is that it wants to be a better C++ but makes the same mistakes. The language is complex as fuck, it tries to be everything.
It's like going to an ice cream shop and being asked "what flavor do you want" well actually I want all of them.

You might think this is good but it's not. It only adds to the complexity and It's a distraction. I've seen a lot of C++ programmers invent problems just so that they could use feature X.

Rust should have been C# without gc and the massive runtime

That way it would've easily found a spot in desktop application and gaming land.

>a decent Swiss army knife language to learn on my own for fun projects
You already know python, right? That's basically exactly what python's for: hacking together mid-to-low quality quick projects. It's got tons of library support for basically everything.

Otherwise, your choice really depends on what projects you want to work on. Go's good if you care about servers. C is probably the most "general" language--basically every programming language in existence can interface with C, so it's almost necessary to know regardless of whether you intend to use it. Ruby is good if you want a python-like scripting language with fewer good libraries but more elegant syntax.

Seems pretty good.

A modern, comfy language that makes zero cost abstractions and compile time checks a huge part of its design philosophy?
Of course I love that.

>these questions can be solved by Go
>I suppose it will become the next industry standard
I understand that Go is becoming popular because it's so simplistic that even retards can use it but that's not the world I want to live in.

Rust is a language in search for a problem, which is why I don't think it will be used much in the private sector.

Is it for safety? Ada already is there and has an ISO standard. But what about the borrow checker? The rust developers could have made a port of Ada to llvm and added the checker in the compiler, that's not against the standard. Also as another person noted, storage pools are the safer way to deal with memory, not compiler checks for the most basic of things.

A 'better' c++? Syntax wise, speed wise? As far as syntax is concerned, rust is showing exactly what a poorly conceived language can look like. And it's only 2 years old. Speed wise is extremely unrealistic.

It's already been explained upthread that Rust is no good if you need control of the hardware.

KEK

Every language in the C family, including C itself, is just a way of standardizing idiom boilerplate patterns of lower level systems.

At its inception, systems programmers thought C was horrible since it allowed mediocre individuals to write bloated nests of function call trees rather than do things the good old way of whole-system design with manually crafted state machines.

C clearly adds less over raw assembler/machine code than C++ or D/Rust/whatever, but it's modern romanticism to claim that its model is some sort of perfect Platonic ideal abstraction to what a Harvard/von Neumann machine "really" is.

What the hell are you even trying to say?

I would really love rust if () and ; are optional.

C circlejerk is carried out by pretentious children with no sense of actual computing history.

What do you mean?

ruby/elixir spoiled me. I always forget to type `()` and `;`

Why are you wasting time and energy talking about Rust instead of Myrddin or Zig?

wheres the difference between java and c# ?

I think it's a pretty cool game, still a lot of bugs though.