[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Rust

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 168
Thread images: 3

I have yet to see anyone on /g/ provide a thoughtful criticism of this language.
Every time it's mentioned the responses only mention the political alignment of the company and people working on it.
So tell me, /g/, what's wrong with Rust the language?
>>
>>59176513
>Every time it's mentioned the responses only mention the political alignment of the company and people working on it.

you just said it yourself.

it can only go wrong with these reddit fags
>>
>>59176513
Fags shilling Rust on /g/ are annoying, to begin with.
>>
>>59176513
>I have yet to see anyone on /g/ provide a thoughtful criticism of this language.
why should we? it's shit and there are better alternatives.

go fuck yourself and go back to shilling that SJW shit on plebbit.
>>
rust code is not aesthetically pleasing and encourages the wrong kinds of abstractions
>>
It caters to a niche that is no longer relevant. It's yet another "C++, but..." in a time when usage of C++ and languages like C++ are dropping and it offers very little if anything tangible to lure users away from the vast array of C++ libraries and resources.
>>
>>59176513
it's hard to master
>>
>>59176513
I'm not sure anybody can provide a thoughtful criticism of that language, since it hasn't existed in a usable form for long enough for enough people to have tried to really apply it in a meaningful way to large projects.

I mean, shit, in 1999 people thought EJB 1 was going to be a hit for years, but it wasn't until a long string of multi-year, complete project failures came out that the consensus became that it's a complete monkey-fucking garbage-pit, to the point where people even knew that EJB 2 was going to be pretty much putting lipstick on a pig.

The reason you see people jump to the political alignment, SJW thing is because nobody can actually tell you how good or bad this language is. Give it time.
>>
>>59176676
>rust code is not aesthetically pleasing
I will agree on that point. It's a very noisy language, like Perl. Even C++ looks better to me.

>encourages the wrong kinds of abstractions
See now this is interesting. Would you be willing to elaborate on that point? Thank you.
>>
Rustfags, is it possible to type this function correctly?
fn covar<'l, A> (a: &'l A) -> Box<Fn(()) -> ()> {
Box::new(move |x| { let q = a; () })
}
>>
>>59176513
The real problem right now is immaturity, there's not a lot you can get done without going into the nightly branch which is not something you can put into production.

Another problem is how FUCK HUEG the binaries are, though that might be solvable through configs. It's not an embedded systems language and non-embedded systems don't need new systems software.

>>59176676
>>59176691
It's not uglier than C++ with none of the drawbacks. C++ will never ever ever ever drop off because it fills a massive part of software development. Everyone runs something which has been optimized from the metal up, rust just lets you do it safely.
>>
>>59176513
99.9999999% of people in the world don't need it.

That's because firstly there aren't many use cases left today where people need a low-level language, and occasionally when they do, they'd much rather use C or C++ anyways since it's not worth learning a new language.

That being said, Rust is a great language for starting a new large project low-level project with a lot of contributors since it forces everyone to write safe code.

People on /gee/ just tend to irrationally hate languages that take a some effort to learn because it reminds them of how lazy and unintelligent they are. That's why objectively superior languages like C, C++, Haskell, Go and even Java (lol) get so much hate.
For these people anything other than Fisher Price learn-in-1-hour languages like JS, Ruby and Python is shit.
>>
>>59176873
Can somebody even explain WTF this does?
Is it some sort of delegate/closure generator or something?

> t. seeples-fag
>>
>>59176977
It's a function returning a function. It's not particularly useful but I don't know how to apply a type to it
>>
Anytime a new language that claims to compete with C++ emerges you need to ask, what's the real substantial advantage? How does it deal with the lack of the libraries that C++ have? And how does the compiler compete with mature C++ compilers?

And so far it seems all of these new languages only offer theoretical or minor advantages compared to C++, can't deal with the lack of libraries (and thus the userbase is not growing fast enough) and won't have good compilers.
>>
>>59176958
So... it's a good language for gayme engines?
>>
>>59177052
yeah but rust has all that covered already, LLVM and FFI, plus mozilla backing it.

The advantage of being safe really shows itself every time we get a new massive security vulnerability (like, daily)

>>59177071
should be, yeah. A web browser isn't actually that far off short a bit of dedicated 3D code maybe.
>>
Use code KEEM for 10% off GFUEL products
>>
>>59176873
Generic function which takes a single argument of type A and returns a boxed function which itself takes no parameters and has no return value whose action is to declare and assign a new variable named q to the argument which immediately goes out of scope.

This function has no use whatsoever.

What is your question?
>>
>>59176513
>So tell me, /g/, what's wrong with Rust the language?
Social justice: The language.

No thanks. It's a pile of shit that holds your hand and produces hideous code, as ugly as the insides of these SJWs who created it.

If you don't want political alignment to matter you shouldn't take a political position as an organisation.
>>
>>59176513
It's a stillborn language, just like D.
>>
>>59178125
Spend a few years maintaining a C codebase and you will understand the need for this language.

If by hand holding you mean that the compiler produces readable and meaningful error messages, and you don't like that, see above.
>>
>>59178125
>>59178125
>these SJWs who created it

About 0.1% of the SJWs festering in technology are actually competent programmers. The ones working at Mozilla didn't build Rust.
>>
>>59178153
>Spend a few years maintaining a C codebase
I love how you rust babies assume that we aren't experienced programmers.

I've got 20 years of programming experience under my belt and have maintained a code base larger than anything written in Rust.

>>59178194
>About 0.1% of the SJWs festering in technology are actually competent programmers
You're being quite generous. Sadly they are the loudest.

>The ones working at Mozilla didn't build Rust.
They're the ones who determine its direction. Sorry but with SJWs, there's no other option but to boycott anything they make. Otherwise they will strangle anyone who's trying to do their work without interruption.

Mozilla needs to die, so does Rust.
>>
>>59178151
Well one major project is stuck using it at least.

>>59178194
>>59178125
>>59178230
The SJWs aren't a part of mozilla research, they're the ones that webdev and integrate worthless web services and make everything run databases to burn up SSDs.

Mozilla research is cool people. Google devs are working up to rust too.

Also it's not THAT ugly, it's even with C++.
>>
syntax. the languare would be really good if it wasn't the syntax. now, we can use D
>>
>>59176513
Can someone explain the SJW angle to me? What did the Rust devs do to piss everyone off?
>>
Compiler is garbage compared to alternatives,language became messy, it outperforms c++ in few aspects,no developer will convert c++ application to rust just because of minor performance boost(usually there is none).

And why start new project in Rust? D does everything rust doea but better, C++ is old and its messy but its easy to find help for it and language has plethora support and documentation.
>>
>>59178230
>I love how you rust babies assume that we aren't experienced programmers.

You've willingly avoided any technical discussion of the language beyond vague handwaving over ugly code and how static compiler checks make you feel unempowered, and your style of writing comes off like average 17 year-old "anti-sjw" crusader, so all things taken into account it's not much of a stretch to think you're incompetent on the subject.
>>
>>59178249
Yeah but how are you going to describe things with the complexity of rust without that much syntax? It's not cosmetic, it's just complex.

>>59178267
The compiler is LLVM though. It's less than a year old and the performance very nearly matches C++, plus it's got provable safety. The performance is a side effect of the language design, the safety is something nothing else really offers and is DESPERATELY needed by a lot of system software. Nobody needs help learning C or C++ they are just incredibly dangerous to use unless you're a top 1% of 1% master.
>>
>>59177071
you dont need to write safe code for game engines
>>
>>59178297
a provably safe library will go a long fucking way though, lots of people just license up a bunch of shit to cram into their game engine and how often does one random library cause problems that the actual developer can't fix?
>>
>>59178317
im not sure what safety has to do with what you said
>>
>>59178332
Things won't break internally. You're always guaranteed to get the result you asked for at runtime because it's all structured at compiletime. Runtime crashes are basically impossible.
>>
>>59178288
>they are just incredibly dangerous to use unless you're a top 1% of 1% master.
Am I the only one who doesn't really see how this is true? I can see how it WAS true, prior to the newer versions of C++ or how it still is true in C, but nowadays we have std::string and other STL types to prevent buffer problems and deal with the clean up/movement/storage of large data, we have various pointer types in the standard library that get rid of the "Oops I forgot to free that and now everything's on fire" problem. I program in C++ every day and I don't see what people are complaining about.
>>
>>59178349
runtime crashes are preferred when writing game engines, you want things running with as little safety checks as possible so things go fast as possible. safety is good for real world applications where if you make a mistake people actually die
>>
>>59178268
>You've willingly avoided any technical discussion of the language beyond vague handwaving over ugly code
Newsflash: Rust has no technical merit over existing languages. There is no point discussing anything but its aesthetics and convenience of using it.

You sound like a SJW from reddit.
>>
>>59178353
C++ is better than it used to be but not everything is solved by RAII and standard library containers; it's still pretty easy to invalidate references.
>>
>>59178353
Rust faggots are always trying to solve already-solved problems and then smile smugly about "safety".

In modern C++ you get safety almost for free.
>>
>>59178353
>>59178385
Because C++ as a language still has no support for concurrency. Race conditions and dangling pointers and all sorts of other problems can't be fixed by C++11's sugar update.

>>59178365
Unless all the checks are done at COMPILE time. They adhere to the zero cost abstraction requirement C++ does only they achieve safety through design. Your actual code is restricted heavily because of safety constraints to achieve ensured safety at compile time.
>>
>>59178377
>it's still pretty easy to invalidate references.
example?
>>
Too complicated, ugly syntax, compilation is slow
>>
>>59178393
>Because C++ as a language still has no support for concurrency
Like I said you still are trying to solve already solved problems.

Yes it does have concurrency support you fucking Rust moron and C++14 is filled to the brim with further support for atomics, threads, promises and mutexs.

The world's best computer sciences have contributed to the new C++ standards. Rust has a bunch of diversity hires trying to prove they can write a language too.
>>
>>59176873
here you go
fn covar<'l, A> (a: &'l A) -> Box<Fn(()) -> () + 'l> {
Box::new(move |x| { let q = a; () })
}

>>
>>59178396
std::vector<int> x = { 0, 1, 2, };
int& a = x[0];
x.push_back(3);
std::cout << a << std::endl; // possibly random garbage depending on whether x decided to reallocate.
>>
>>59176513
Tip-toeing with all the rules and safety does not interest me, or at least in the domains i'm interested in.
Syntax is noisy. D is a superior alternative if you want a saner C-style statically compiled language. (It has huge flaws too, but they are workable)
>>
>>59178393
It may not have any cool keywords for concurrency (although the committee is threatening to bring them in in their quest to absorb every feature of every other language) but it has the best concurrency support I've ever used. The mutexes are so much cleaner and less verbose than those in say, Java, the same with the condition variables and threads. Haven't used the <future> header much but it seems good too.

>>59178396
It's not hard to do, say :

map<string, string> stuff;
stuff.insert({ "foo", "bar" });

string& item = stuff.at("foo");

stuff.erase("foo");

cout << item << endl;


C++ will let you do this and blow your own head off. You can do the same thing with a pointer to the item as well.
>>
>>59178452
Yeah, I don't have any hate for C++ it just doesn't FORCE you to get it right. Again the best of the best could have always done things without issue, but rust is safe for any idiot.
>>
>>59178443
Who seriously writes like that? I've never seen code written like this.

vector<int> x {0, 1, 2};
auto it = begin(x);
x.push_back(3);
cout << *it << endl;


There, it's never undefined. Learn how to use a language before criticising it.
>>
>>59178452
But it's obvious to everyone reading that code that erase invalidated your reference.

Is Rust catering for people who are brain damaged?
>>
>>59178547
or that is a simplification of a problem that could happen a thousand lines of code later.
>>
I really like Rust. Things I like:

It's fast as C/C++ but still safe
Data race free concurrency
Immutable by default
Algebraic Data Types
Powerful type system
Powerful type inference
Monadic error handling
Pitfall free good syntax
Easy to use closures
Elegant zero cost abstractions
Trait system
Pattern matching
Cargo is a great package manager

I agree that some corner case syntax examples people post really go out of hand and become hard to read but those are corner cases
>>
>>59176513
The only valid criticism you need is that Ada exists.
>>
They still have to implement asynchronous I/O and POSIX threads which is pathetic
>>
>>59176513
It's syntax is different from most languages, making the knowledge of using not very transferable.
It needs macros to do the simplest things, and macros in rust are even more unreadable than C /C++.
Rust's object model is insane. It's genuinely retarded.
Cargo pulls arbitrary code from GitHub.
Brainlets who can't into C shill for it, even though they know nothing of either language.

It is safe, and the type system is powerful, but it leads to a lot of verbose code for little benefit 70% of the time.
>>
>>59178888
>It's syntax is different from most languages, making the knowledge of using not very transferable.

It's nothing alien to the likes of Swift. Not even C or Java.

>It needs macros to do the simplest things, and macros in rust are even more unreadable than C /C++.

Such simple things as?

>Rust's object model is insane. It's genuinely retarded.

How so?

>Cargo pulls arbitrary code from GitHub.

Learn what arbitrary means. It's called dependencies.

>Brainlets who can't into C shill for it, even though they know nothing of either language.

I know and use C at work and I like and respect the level it operates at. But I dislike certain things about it like the dumb macros and syntax related pitfalls. Rust abstracts a lot more so the level I mentioned is abstracted (with no cost but still). However I understand how the abstractions work and my C knowledge helps me appreciate Rust more.
>>
>>59179288
Why the hell do you space your posts like that, redditor?
>>
>>59179339
What are you going to do about it?
>>
>>59178814
Ada doesn't do as much at compile time as you might expect. Rust is in some ways "a better Ada"
>>
>>59176513
It sucks mega dicks at working with the OS.

The way rust works is just too different from the way most OS apis work.
>Better put that shit in an unsafe block you little cuck

However, I still love it and I try to make the best of it
>>
>>59178844
>C has yet to implement async I/O and POSIX threads which is pathetic
>>
>>59178844
>openmp
>>
>>59179625
Rust has no glue with C code to do those, while fucking Node has optional support for it, welcome to programming btw
>>
>>59179632
>needing external libraries to do system things on your systems programming language
xd
>>
>>59179860
>external libraries
OpenMP is not a "library".
It's a compiler extension.
>>
>>59179852
>C(ancer)
>async support
LMAO>>59179852
>>
>>59179877
>what is poll() and signals
kek, welcome to programming as i said
>>59179870
C requires no compiler extensions
sorry about your lang
>>
>>59179890
>what is poll() and signals
Retro trash
>>
>>59176513
Do they have an international standard yet?
Not interested in languages that the creators have complete control over.
>>
>>59179923
What's the use of an ISO again?
>>
>>59179909
>tfw retro trash is more efficient than your new meme
sorry about your language again
>>
>>59179952
wow anon sure showed my with that 0.00001% efficiency gain
>>
>>59179970
>0.00001%
>>
>>59179339

>The line break autist, again
What exactly do you think you're contributing to this board? Think about it, and evaluate your life choices because someone's formatting style "triggers" you.
>>
>>59179983
I meant 0.0000001%, sorry
>>
>>59179989
meant for >>59179974
>>
>>59179890
>>what is poll() and signals
Not part of C is what it is
>>
>>59179943
Standardizing the behaviour of the language constructs and the standard library functions so other parties can implement their own compilers.
So that in 20 years I can still compile code that doesn't rely on the unterlying operating system
>>
>>59179999
Signals are part of standard C.
poll is part of the standardised POSIX C.
>>
>>59180017
>So that in 20 years I can still compile code that doesn't rely on the unterlying operating system
LLVM isn't going anywhere in 20 years
>>
>>59180035
That doesn't matter if the Rust language spec changes and my code won't compile anymore (or even worse: will give the wrong results).
>>
>>59180019
>poll is part of the standardised POSIX C.
POSIX is an api, not a part of C. mio is also an api that allows async IO for rust.

>Signals are part of standard C.
The funny thing about that, is that there is no way of changing what signals do without signal() or sigaction(), both not C
>>
I think the NSA is making companies like MS and Google to anti-shill Rust. Rust makes security exploits harder to produce. This is is against the interest of the NSA and they want to prevent Rust in any way possible.
>>
File: rust.png (393KB, 720x800px) Image search: [Google]
rust.png
393KB, 720x800px
>>59176513
people just rather use C++
then again props to the name of the language, reminds me of pic related
>>
>>59180045
Rust stable releases are backwards compatible
>>
>>59180046
>POSIX is an api, not a part of C.
I didn't say it was. I was saying it was part of POSIX C, which is still an incredibly important standard. It's just not ISO C.
>signal()
That is a standard function (as in ISO), you idiot.
>>
>>59180064
Doesn't help if the releases won't run anymore on Windows 2038 because they decided to ditch it for yet another "better" language in 2026.
>>
>>59180046
C.ucks BTFO
>>
>>59180076
Is that a subtle "I got owned: the post"?
>>
>>59180067
>is still an incredibly important standard
because of its age and acceptance

Rust is still young and it would be naive to think it would have such a battle-hardened standard like POSIX

>That is a standard function (as in ISO), you idiot.
my bad, famalam
>>
>>59176513
>Rust
All the speed of Ada with all the type safety of C
>>
Sorry (c)rusty boxer wearers, C is still the most popular and minimalist language :(
>>
>>59180105
the borrow checker is stronger than you might think

just try and cause a race condition between threads
>>
>>59180109
Windows is also popular like C(ancer). Doesn't mean it's any good.

>minimalist
Nice way of saying C is a featurelet language
>>
>>59180109
>crusty
That's a good name for a C to rust converter
>>
>>59180089
No, it's a not-subtle "I can still compile FORTRAN code from the 60s if I chose to", meaning that if any language designer can't bring itself to standardize it then the language as a whole is not worth wasting your time on.
>>
>>59180157
You can compile a rust code you write now 20 years in the future. Rust is backwards compatible, it's in the design goal
>>
>>59178393
What's wrong with C++11 concurrency?
>>
>>59180197
It seems you did not understand >>59180076. Please read it agian.
Hint: No, I may not be able to do that in 50 years. And I won't be able to find a reliable document that describes in detail how things behaved in version 1.3.5.7.12224.
>>
>>59180222
>And I won't be able to find a reliable document that describes in detail how things behaved in version 1.3.5.7.12224.
... to write my own compiler (or at least a transcompiler).
>>
>>59180122
>Windows is also popular like C(ancer). Doesn't mean it's any good.
Linux is more popular in the development and server and everything non-consumer so that's a moot point
>Nice way of saying C is a featurelet language
what Rust does with slow features C does with super minimal standard library functions or less, and faster
It's good to help people like you get a programming job (makes it accessible) so it's good in that way I guess
>>
>>59180244
>Linux is more popular in the development
wrong, windows is
> super minimal standard library functions
Real world programs import more things than stdlib
>>
>>59180053
Can confirm. People in /g/ will shill Visual studio with that botnet compiler
>>
>>59178393
> Because C++ as a language still has no support for concurrency.
So which thousands of companies use Rust for concurrency?

The clouds and clusters of the world seem to use new technologies on the JVM (Spark, Akka, Cassandra ...)
>>
>>59180264
>wrong, windows is
nope, linux is
>Real world programs import more things than stdlib
they certainly dont download libraries from outside to do threading and OS related things that should already be in the language
>>
>>59180287
>nope, linux is
https://stackoverflow.com/research/developer-survey-2016#technology-desktop-operating-system
Gives you an idea
>they certainly dont download libraries from outside
what
>>
>>59180264
> wrong, windows is
No. Linux is for servers, hands down.

Android (also running Linux) is also more popular for consumers' personal computers.

Yes, they're smartphones, but that's actually the primary computer for most people right now.

> inb4 muh inevitable "desktop" subsegment of personal computers where Windows "wins", ignoring the larger personal computers
>>
>>59180305
Most people that use Android doesn't even know what Linux is, they don't use Linux because they appreciate the greatness of Linux.
>>
>>59180295
>stackoverflow
>developers
kek
>what
Rust has to download libraries from outside to do async I/O and code flow, check out mio
While C has it built in, it's just sad
>>
>Your programming language needs a "code of conduct"
>Your programming language needs a dependency/package manager

The first one is only silly, but the second one is inexcusable.
>>
>>59180331
>Rust has to download libraries from outside to do async I/O and code flow
Are you retarded or what? If your applications are dependant on I/O libraries you need to download it, via package manager or manually

>stackoverflow
>developers
>kek
XDD

Also
>C
>Async
>>
>>59180348
>Are you retarded or what? If your applications are dependant on I/O libraries you need to download it, via package manager or manually
C doesn't have to do that though, they come in the stdlib, with your reading comprehension no wonder you can't do beyond Rust

just leave programming to those that can do it my man
>>
>>59180355
As I said before, real world applications require more than stdlib.h, not that your fizzbuzz needs it
>>
>>59180355
>just leave programming to those that can do it my man
Funny how Rust is actually harder to learn than C
>>
>>59180287
>they certainly dont download libraries from outside
Mostly it's bundled, but yes, using Apache Spark, Docker or other external things is *the* most common way to do things on (private or public) clouds. Which are spreading through companies like crazy right now.

>>59180329
Sure, and I propose that whoever made the comment about Linux not being the most used for servers also doesn't realize how it really is.

Same as with the Android user base not knowing, it doesn't change reality though?

[Just as a remark: A good fragment of people who know anything non-trivial about Android know that there's a Linux kernel and an ART JVM as the main "pillars" of what Android runs on. That's not completely nothing.]
>>
>>59180374
>Linux not being the most used for servers
No one said that
>>
>>59180379
Good point. I stand corrected.

Either way, Windows also isn't more popular for personal computers at this point. It's far outclassed by Android.

Even in places where people tend to have both, people still apparently use the Linux-based Android more on average.
>>
>>59180374
Of course you'll use outside libraries but not for doing OS functions and for things that should already exist in the language stdlib.
>>59180373
Is that why you struggle to write in C?
>>59180365
real world application would never use meme languages like rust tho, you tried
>>
>>59180401
I learned C when I was 16.
>>
>>59180401
real world applications use Java more than C as well. And both are trash
>>
>>59180401
> but not for doing OS functions and for things that should already exist in the language stdlib
Stdlibs tend to be ridiculously incomplete no matter what.

They don't even cover the algorithm and data structures in typical comp.sci books (CLRS or whatever). Likewise, they don't cover what's needed for actual parallelism and concurrency.

Virtually everyone who quickly had good success with these in production used external libraries.

Yes, there are a few computer games or databases or such that got somewhat to fairly extensive parallelism without any libs, but if you look at the majority of the market most programmers just couldn't handle doing more than 1-2 threads and most based on mainly the standard library only managed to tack on parallelism and concurrency after YEARS of work. It just doesn't seem to really truly work with normal standard libraries.
>>
>>59180408
but you don't know C
>>
>>59180495
No one knows C. It has many unspecified behaviors
>>
>>59180529
Unspecified behaviour is actually a completely specified term.
>>
>>59180479
Wholefully agree but the degree of incompleteness is unmatched by any language other than Rust. I love the features and syntax but it's just unusable and garbage without those things
>>59180408
You can't code in it though, you don't have what it takes
>>
>>59180495
>>59180544
I can school you on C, child
>>
>>59180539
>let's specify that it's unspecified
top quality strawman
>>
>>59178317
>provably safe library
That's the meme though. Rust hasn't (and probably never will) been proved safe. The Rust shills believe just because there are some compile-time/runtime checks (nothing you can't do with a static analyzer for any reasonably popular language) you won't have any bug anymore but that's just plain wrong.
>>
>>59180606
static analyzer doesn't even come close to the array of all the safety checks/practices rust provides. If you used it, you would know.
>>
>>59180329
And people use windows for its greatness?
>>
>>59180637
No, and it's popular already. Like C. And Java. And python. And Node.js
>>
>>59180544
> Wholefully agree but the degree of incompleteness is unmatched by any language other than Rust.
I don't really have an opinion of that myself, but I guess that's possible.

> I love the features and syntax but it's just unusable and garbage without those things
Maybe?

OTOH I'm observing that the *ONLY* concurrency for both processing and data that seems really workable right now (as in: without multi-year projects involving experienced programmers working out all the problems and skilfully avoiding most) is the JVM's Scala Akka & Spark based concurrency and a few other JVM implementations, and they're not really part of the standard library either.
>>
>>59178373
>No technical merit
Maintainability you dipshit. Sure, you can make stuff all day long in C, but as soon as something needs to be patched by someone else, You're fucked.
>SJW from reddit
Because MuhZilla can't create anything worthwhile.
>>
>>59180567
You sure can, brainlet
>>
>>59180529
Any proper C programmer understands undefined behavior. And you do realize Rust has undefined behavior as well? I guess no one knows Rust either.
>>
>>59180718
>printf something, --something, something
>it's an unspecified behavior
>>
>>59180635
Wait, have YOU actually ever tried running a static analysis or have any clue of what "provably safe" means? That's not something you just magically run on a code base without configuring anything. Proving a program's correctness requires an insane amount of human input from the specification to helping the prover know what to do (or enjoy having to wait decades/till the end of the universe for it to finish) and you're deluded if you think rustc (or any other compiler for any language really) could do it by itself. Memory safety is absolutely trivial to check in comparison. This is why I shill against Rust. It doesn't cover the right issue.
Also it's objectively ugly.
>>
>>59180728
That's not unspecified behaviour: it's undefined behaviour.
>>
>>59180740
It's not the rustc that provides all those safety features. It's almost impossible to produce dangling pointers and has nothing to do with the compiler, rust language itself force prevents it
>>
>>59180728
D doesn't have this problem
Binary expressions and function arguments are evaluated in strictly left-to-right order. This is similar to Java but different to C and C++, where the evaluation order is unspecified...
>>
>>59180728
What are you hoping to accomplish with this. Did I say C had no undefined behavior? Or do you think a proper C program doesn't know how functions are evaluated?
>>
File: rust-styles.jpg (177KB, 700x490px) Image search: [Google]
rust-styles.jpg
177KB, 700x490px
>>59176513

Rust is theoretically a good idea.

I'd love a language with the power of C++ and a cleaner syntax.

But you have to realize that the industry moves very slowly. Would you rather hire C++ devs with years of experience and trust C++ (which has been there for decades) or hire some Rust enthusiastics and just pray that the Rust team doesn't fuck up and deprecates hunderds of thousands LOC in your production system?

The problem with Rust is they they use a "WebDev" methodology in a very technical field. It takes years to master C++, so if you want to catch some C++ developers to shill for Rust you really have to brign up something genius, maybe even make your Code "C++ like" in large parts to make the switch easier.


The Rustafarians (or how do they call themselves lately?) are kinda ignorant, they just say "look at our crazy freking cool language!" instead of building upon what is already there - in terms of technology and coding practice.

For example their "Ruby-like" syntax:
Personally I think Ruby is a great language, but what is your target group for Rust? WebDevs? Then why should they bother with a systems langauge?
Or are you targeting system developers and engineers? Why would you expect them to know Ruby?

So you end up with a very small overlap, i.e. the guys building firefox (where oyu have to go low level AND are a web guy).


It's just isn't a well thought out concept. You try to bring a "hip new spirit" into low level programming, similar to what Elixir did. But the difference is Elixir has a clear target group and is kinda easy compared to Rust, which requires more thoughts/knowledge about low level programming.


I'd like to see Rust shine, but I'm afraid it's DOA. so when can we expect a good C++ successor?
>>
>>59176513
It bothers me a lot because this isn't what I see when any other topic is broached, it's like a company was hired to fud against rust for some reason. Aside from politics, the other aspect I see are lies, such as people saying rust will never replace C because it is a garbage-collected language. All in all, the only argument against rust I've ever read on /g/ was that it is verbose, everything else being a mix of fud, lies, politics and namecalling. This isn't the /g/ I once knew.
>>
>>59180765
So I usually avoid Rust threads because it's full of drones but since you don't look like one I'll give my whole input on that topic, maybe you are aware or not of all the things I'm talking about and I don't want to sound patronizing (and I might be wrong on some points) but I think you're making the typical mistake I see among Rust enthusiasts. How do you KNOW it's impossible to break things with Rust? You have to formalize your language using a logical framework (I'll give you that this might have been done, it's rather easy, I can find several papers on formalizing the Rust type system and semantics but it doesn't appear it has been completed). Then you need to prove your implementation (rustc is the only one I know of for Rust) adheres to the specification and doesn't produce bugs on its end. That is something I'm sure hasn't been done because it is a fucking pain in the ass and the only production-capable proven compiler I know exists for a restricted subset of a simpler language (C) and hasn't been formally proven in all of its code base. Also there has been proof of concept of people managing to break things with Rust outside of unsafe blocks, granted it wasn't very idiomatic but same could be say about most other typical bug-inducing things. So you also need some way to make sure your input (your program source code) indeed does what you want. This is not something a language guarantees.
Believe me trying to force people to make shit that doesn't break has been a huge quest for decades but that's impossible (or your language isn't Turing-complete, but I'll admit you can do most things with a provable restricted subset). I support Mozilla in their attempt to make software suck less, this most certainly would have been my PhD subject if I didn't go in computational science. Thing is I'm sure designing a new language isn't the way to go at all as at worse it creates one more broken language, at best it delays improvement of existing tools.
>>
>>59181044 (cont)

tldr I want the whole Rust tool chain to be formally proven. In the mean time it's basically glorified unit testing.
But at least the language uses LLVM and allows to do without the abstraction nonsense, those are points I really like.
>>
>>59181044
>>59181065
Hello google shill. How does it feel to have to pretend you're inbred every day like that?
At least i hope you're merely pretending.
>>
>>59181077
Nice "counterarguments" you presented there, friend.
>>
>>59176513
>So tell me, /g/, what's wrong with Rust the language?
Dependency hell, all the big libraries depend on a couple dozen smaller libraries, at some point one of those smaller libraries are gonna break something that brings the whole mess crashing down.
Remember leftpad?
>>
>>59178266
They vote Democrat.
>>
>>59180567
you can't school anyone if you don't know wtf you're talking about tho
>>
>>59181002
If getting your feelings hurt bothers you maybe you should go back to the website you came from.
>>
>>59176513
Oh look, it's another D 2.0 thread
>>
>>59180916
How the fuck is Rust like Ruby?
>>
>>59181273
for (0 .... 100).each |i| {
print!!!!!("It just is")
}
>>
>>59180916
>Personally I think Ruby is a great language, but what is your target group for Rust? WebDevs? Then why should they bother with a systems langauge?
desu I think this is Rust's niche: something webfags can get decent at to write FFI extensions to their interpreted meme languages and grab a lot of the low-hanging performance fruit
>>
>>59181345
>!!!!!
eww
>>
>>59176513
I'd use it if the syntax didn't look like dog food.
>>
>>59181592
Syntax is literally the last thing that matters though. I wouldn't be using ML family languages otherwise.
>>
>>59181609
I'd rather stare at something beautiful than at an eyesore.
>>
>>59181044
The fact that CompCert exists doesn't help you at all if you're still using GCC day-to-day. Though, given the complexity of the Rust type system, a soundness proof would be nice to have.
>>
>>59181719
Rust's safety checks all exist in GCC though. Just run ASAN.
>>
>>59181592

To be fair, I think they treid their best:
Bascially they throw together Ruby, Scala, OCaml and even a little bit C++.

I mean so many langauges, it has to be good right? Just look at Perl: more is always better!
:^)


>>59181537

But that's the thing: web devs love to try out new things but they are all ADHD. Don't expect them to get funky with something overly complicated.

Why should someone bother learning Rust when including C or even C++ libraries is so damn simple with Python or Ruby? It makes no sense..


>>59181345

Hahaha, nice.
>>
>>59181739
Did you reply to the wrong post?
>>
>>59176513
the sjw politics are more of a nuance than a major problem. Just don't say anything you would say in 4chan on their IRC and its all good.

Sure if you make a commit to the official repos and include the word "he" on a comment you can expect someone angrily demanding you to change it for something more "inclusive" in less than 5 minutes.
>>
The most compelling argument against rust that I can make is that it forces the programmer to think about the programming language at every point in time. The sheer number of concepts and syntax in the language is astounding, and it adds a whole new layer of statefulness with it's move semantics.

If you program in a small simple language like C and Go, there comes a point where the language sort of fades into the background and you don't have to think about it, you can focus on solving the problem at hand. In rust, I feel, you never acheive this. You always need to be thinking about the language.

I prefer languages you dont have to think about.
>>
>>59183729
Agreed. Just one nice example, some languages make you write different keywords for mutable or immutable variables. In Go, you don't have to think about it at all. They're always mutable. It's much simpler to use.
>>
>>59179593
Some would say that's not what a compiler is for and why static analyzers like spark exist.
>>
>>59183729
My experience, having written around 150,000 lines of Rust over the past few years, is that the things I think about when writing Rust are the exact same things I "should" be thinking about to write good C code. C lets you half-ass things like memory ownership, object lifetimes/invalidation, error handling, or cleanup, but if you want the program to be robust and not leak memory, you'd better put in the work to get all of them right. In Rust these are either checked by the compiler or handled automatically.
Thread posts: 168
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.