Damn its actually pretty good. Time to move on from C I guess.
Damn its actually pretty good. Time to move on from C I guess
Other urls found in this thread:
doc.rust-lang.org
en.wikipedia.org
twitter.com
A language without goto/label. Into the trash. I will stick to OCaml a real language with goto/label.
It's pretty comfy. Some things C is still better for but Rust does so many things right. Sad to see Jow Forumsfags constantly hating on it because of the creators though, care about the product itself instead.
Rust has labels idiot.
'outer: loop {
println!("Entered the outer loop");
'inner: loop {
println!("Entered the inner loop");
// This would break only the inner loop
//break;
// This breaks the outer loop
break 'outer;
}
println!("This point will never be reached");
}
Yikes, the syntax highlighter really did not like that one. Source is doc.rust-lang.org
>another rust shill
will you fags ever get tired of pushing your queer language no one serious cares about?
52 minutes until the first Jow Forumstard with no opinion about the language itself, that has to be a record in the past few weeks.
xir please, that post is problematic
>he think we will move on
*steps in your way*
That's not the same thing. If there is no goto, you're labels are not interesting.
>didn't think much of rust before
>see all the assblasted Jow Forums transplants whine about it daily
>now learning rust in my free time
>its the definition of comfy and I really enjoy it
One of the only valid uses of goto that you can't otherwise construct with good code is breaking out of nested loops, but I get your point.
Samefag shill
mad Jow Forumstard
you know the language is shit when your main selling point is "it pisses of Jow Forumstards" (what does that even mean? how is Jow Forums related to programming?)
Breaking out of nested loops and goto error chain to release resources. I use gotos in C quite a bit and I really believe it's the most appropriate solution in those scenarios. (but RAII and try-catch-finally are also an option if language provides them)
You'll come back after realizing how shit the BC is.
goto's simply do not fit into high level compile languages like C.
Especially not in optimizing compilers where the codegen certainly isn't what you think it is.
Goto is for subhuman trash. Use more structured methods like rusts named loops.
It is TRIVIALLY easy to fake this. Literally just click the drop down and tick/untick "You".
Fuck off with your pathetic """"""""""""""""proof""""""""""""""""
>goto/label.
Go To considered harmful
That's why when people want safe code they go to OCaml with is a goto/label paradise.
I mean, that was just how I first decided to get into it. I wouldn't call it a selling point, more like the way the lang was advertised to me.
its also trivially easy to state "these people are samefags". Like, I personally know you're lying because you linked to a single one of my posts and this is my second post ITT but whatever man
meme language for neets
It's not related to programming, and that is the exact issue. They constantly shit on the creators because some have leftist views and on the CoC (only applies to people who *contribute* to the language that says be respectful and don't call everyone a nigger faggot).
no exceptions, no nulls and no garbage collection and no race conditions. These alone make it solve most of the problems I have to debug in coding.
It's guttertrash, see
>They constantly shit on the creators because some have leftist views and on the CoC (only applies to people who *contribute* to the language that says be respectful and don't call everyone a nigger faggot).
That's enough for me to avoid it. I'm sorry, I didn't start the culture war. I avoid you people like I avoid lepers.
This is a good thing, fucking idiot.
>exceptions
i hope i never use anything you worked on
No, they go to Coq or Isabelle/HOL, followed by C. Alternatively they go to Ada and use SPARK. But in the end, C and Ada are the only (relevant) languages that can give you provably safe binaries.
OCaml is based anyway.
The biggest problem I have with Rust is its borrow checker. It's too much of a burden. Especially compared to garbage collected languages. It's hard to reason what the Rust borrow checker will do. Sound code could be rejected. Some code requires lifetime parameters.
I haven't used Non Lexical Lifetimes yet, but I don't expect it to solve all of my problems.
The rust language itself offers nothing new and is poorly implemented. So what's left besides marketing wank and the community full of shills who harass everyone.
...
C is serious business
rust is just a meme
how does it feel that no one will even remember rust in 10 years?
JFC what a bunch of retarded faggots. Besides, in standard English male pronouns are typically the “gender neutral” in that if the gender is not known or irrelevant male pronouns are the default.
Fucking degenerate commie kikes.
Nothing in Rust is new. Having all the features that Rust has in a single language is new.
If sjw is your first and only argument against Rust then the language itself must be really fucking good.
>If ballpoint-pens is your first and only argument against pineapple then the bananas itself must be really fucking good.
>they go to Coq or Isabelle/HOL
That's when OCaml isn't safe enough. But I agree.
>that can give you provably safe binaries.
Only if you use C compiled with compcert.
At least we agree that sjws are completely unrelated to the quality of the language.
NLL makes it much easier though. Expect more improvements with time.
you'll be doing everyone a favour, thanks
You wrote nearly the same identical post in the least rust thread. Jow Forumstards are npcs.
I'm currently trying to give Rust a go with an open mind. I like the look of some features, like match and the whole struct/impl/trait system, but I'm really struggling to figure out how you're supposed to accomplish anything useful with any reasonable degree of efficiency with the strict rules of the language, like how any object can only have 1 mutable reference.
I'm used to mostly writing in C, and the idea of immutable variables seems like an absolutely terrible idea. Why would anybody want to have to constantly make copies of variables whenever they want to change something? It feels like I'm living in bizarro world that anybody would consider this a desirable quality in 99% of cases. I can see the value in such a feature for safety, but I'm not writing OpenSSL here. It seems to me like in most cases, fixing bugs that pop up a year from now is far better than having to make new copies of things constantly.
I feel like I must be missing something important here because I just don't see how you're supposed to write anything remotely efficient while obeying Rust's safety rules.
>I'm used to mostly writing in C, and the idea of immutable variables seems like an absolutely terrible idea.
It's to prevent you from accidentally mutating values you don't intend too. Which is a common occurrence in other imperative languages if you aren't careful.
Immutable by default is a step in the right direction though, fighting the borrow checker happens mostly when people spray mutability out everywhere all at once.
But isn't having to make new copies of things all the time far worse than making mistakes every now and then, unless you're writing critical security software (which most people aren't)?
It doesn't make copies. The point of writing Rust is that you're securing critical security problems by default (so 100% of people are).
Having to track the codepaths of mutable values is really weird and new to C people but it's a design challenge not really code related.
>But isn't having to make new copies of things all the time far worse than making mistakes every now
Not in my opinion. It can be very difficult to find a variable that's mutating by some other function that it shouldn't be in a large program. I think for any large program default mutable data can be a source of big problems. In smaller bits of code I agree that's it's just kind of annoying and not worth the effort.
I know you trannies really, really want to make Rust the new Jow Forums approved language, but you'll need to shill a little less frequently and maybe make something useful if you really want it to be considered as anything other than the latest meme.
I know Jow Forums is new to Jow Forums but trannies are the approved style of programmer here.
They're approved for programming everywhere. Say what you want about women and minorities in tech but gays and trannies have always been a huge part of computer science.
This is correct. Academia is very gay and so are most programmers I meet IRL.
Immutability by default has nothing to do with the borrow checker.
>fighting the borrow checker happens mostly when people spray mutability out everywhere all at once.
The problem I have is with the word *mostly*.
no one's stopping you from using Rc you know
Sure I can, but I still have to deal with the borrow checker.
Go is first language that has chance to replace C
>goto in functional programming
yikes
The borrow checker is approaching the problem the wrong way. There are two major problems with it.
>1
It proves correctness rather than proving incorretness. It rejects valid programs rather than failing to find invalid programs.
>2
It's baked into the compiler rather than being a distinct static analysis tool.
>release resources
luckily rust has no need for free()
what other languages did Rust's no-GC ownership/scope/lifetime based memory-safety shit?
Go has literally no use except for web-dev, prove me wrong (please)
>It proves correctness rather than proving incorretness. It rejects valid programs rather than failing to find invalid programs.
I agree.
>It's baked into the compiler rather than being a distinct static analysis tool.
I disagree. I think it's fine to have it baked into the compiler, but it would be good to conditionally opt-out of borrow checking.
For instance, in Idris you can default to totality checking by adding the following to your file: %default total. Otherwise, you have to manually add total above each function for the totality checker to run. A similar construct could be used to control the Rust borrow checker.
DON'T YOU DARE
You will write code that is vulnerable to stack overflows and buffer overruns and null pointers and crashes just like all the top C programmers in the world! I COMMAND YOU!
>reference counting
>memory leaks ahoy
why are you using a mutable graph that you understand so little about you can't figure out which pointers need to be weak and still claiming you shouldn't be out with the brainlets coding in Java/C#
It's amazing how language designers always come up with the worst solutions. You should really just be able to say break break; or break continue; for nested loops.
On top of being less readable, that's a refactoring bug waiting to happen.
Maybe break 1; would work better.
Does your language have a cool ass mascot?
If you want readable, goto is a better, more robust solution.
It is easy to use goto the wrong way, but when you use it right it is godlike.
Jesus fucking christ, what is it with with the massive surge of rust shills lately?
Compilers are already very good at optimizing updates to immutable variables since that's exactly what compilers that use three-address code internally are already doing, immutability also opens up other opportunities for the compiler to rearrange operations and remove redundant updates
go is for replacing python, not c
>go is for replacing python
Lol before go will have half of the libraries of Python we will already be in our graves
well a lot of the really big python projects are dedicated to unfucking python performance so those aren't necessary.
I think Julia or nim will replace python sooner than go will
nim is a meme language.
I want to love it but I can't
Nobody will ever use those things though
The nim compiler is a buggy mess. It doesn't have the backing to replace python or go. Julia doesn't have the same traction is R and it's not python.
What's the point of safe memory?
What does it do?
Why should I even use it?
Yeah, i make games and this shit aint gonna click
You fags say everything will replace everything yet here we are with the same languages we were using years, YEARS ago. The only big difference is Javascript outside the browser that got insanely popular, except for that is the same shit since like 10-15 years
C gives programmers lots of power
C attracts lots of bad programmers who don't test/understand how memory works
C lets the programmer have lots of memory bugs
C++ is too scary for most C programmers
Mozilla couldn't find enough people to maintain their C++ code base, which was atrocious since C++ also lets people do lots of bad habits
Mozilla created Rust as a way to hand hold the programmer, since they can't be trusted, and forces them to nicer looking code by creating a built in bully named the borrow collector. The borrow collector will bully the programmer if it spots anything less than optimal, sometimes even bullying them for optimal things just to torture them.
Thus Rust was born. The first iterative language that bullies the programmer until they obey the rules. Most people don't like this bullying though which is why 8 years later Rust is still barely used outside of Mozilla projects and a toy OS to prove it could be a systems language.
I don't think python will be replaced anytime soon, but I don't think go will be the language to replace it
To be fair many many many C/C++ projects do their own self-bullying in the exact same style but with performance costs.
Conservative are so disgusting and mentally ill, I'm shocked there's any crossover into tech
Is it really a performance cost to make sure you free your memory when you're done using it? From a memory perspective it's not hard to keep C free of errors because of it if you document how things are used, paths they take, and if needed, do cloning if you must share copies of it to make it easy to know when it's safe to free. Rust's borrow collector basically does this for you to make it brainless if you follow the rules, and their message passing means between threads keep it all safe as well to avoid pitfalls of concurrency.
Use after free is another big problem, to add runtime checks means adding a performance cost. Now it's not impossible to design a piece of software that logically keeps its memory safe but your UML diagrams about how this design works will probably not survive intact til release and you can't even hire someone on the basis of them knowing how to use and design memory safe code.
Imagine being so shackled by labels that you can make broad inane comments about half of the population.
You're right to ignore those cattle but you should also avoid needless titles. "Culture war" is a meaningless name for a struggle that has existed for as long as politics.
You both became slaves to ignorant flippant labelling.
Sorry OP rust is a meme. It makes sense as a beginner language or for simple projects, but the training wheels are there for the ease of replacing maintainers. It's just a way to devalue you. What does rust do that C can't when both are used by competent programmers?
C gives its user total control, rust abstracts control away from you. Why would you want that?
>not eating spaghetti with fork and spoon?
are americans serious about this shit?
Competence is impossible to judge thus the idea of competent programmers over-values the reality of 100% incompetent programmers.
>anyone who doesn't swear fealty to the identity politics cause is a conservative
This is why Democrats lose elections.
| ||
|| |_
The language. Kinda triggers me the same way the python is
__main__
__*__()
The language.
Mayb Im just an autist.
I suppose this stance makes more sense as a hiring manager. But you really do give up the possibility of a dennis ritchie using rust to change computing.
I mean to say you average out everything, you get rid of the bad but also lose a lot of good.
You don't need UML designs or runtime checks to document the scope of input, output, and local variables. This ultimately stems to poor documentation on the programmers.
I suggest taking a look at NASA's C coding standards which show how to document good code and keep it safe.
Dennis Ritchie was incompetent at least 1% of the time, too. Things also change outside of the programmer's control, they don't know everything to begin with, they might have a bad day.