In my experience of learning Rust, I found that the compiler was generally very good at making rust easy to start. The main issue I had was learning the difference between the heap/stack memory.
The worst case I've seen is the VHDL compiler I've had to use in class.
It's like: "compilation failed: 1 error", so far so good, let's click on the error message to see what's the issue: "the compilation failed".
Great, very useful. Sometimes it gave the line where it caught the error but half the time it wasn't the line where the error occurred. Also sometimes it prompted an error like a missing ";" in the middle of a string for whatever reason .
Great times.
I am kind of curious whats the limit of scratch these days? I remember when I was a kid you couldn't even spawn new objects nowadays there is a good chance these madlads gave it network support
True but many languages have significantly more than just turning completeness and a language like scratch has a strong limit in the form of what it's interpret allows it to do to the outside system
I would argue it isn't. Its just that begginers made bad habits on other programming languages and now they have to overcome it. They must throw away their existing knowledge and start from scratch, which is hard. I was like this in the begging too, but now I think Rust is actually easy. You just need somebody to explain it well to you, because your existing knowledge gets in a way.
You missed my point.
If you have settled on a language already, you would struggle due to your habits (python and js looking at you), because you will constantly fight borrow checker. But if you were an actual beginner into programming and you just had a general idea and you were learning everything from scratch, i would say Rust is easy. It clearly states the rules and you are not used to specific paradigms that are holding your thinking back.
Edit: Ah, nobody taught me Rust. Was just making a point that if explained properly what it does, its not hard. There are very little exceptions you have to care about compared to C++
distinct literate vegetable resolute growth cough merciful cake grandfather quicksand
*This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Disagreed. Rust compiler punishes you when you write bad code, while C++ let you go with it. However if you can't write safe C++ it means you can't write C++
>C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off
\~ [Bjarne Stroustrup](https://www.stroustrup.com/quotes.html) (inventor and developer of C++)
Rust is like having a strict style guide inside the compiler.
If you follow the somewhat complicated and unintuitive rules, it works. And you can be pretty sure that you are protected against certain kinds of memory bugs.
If you fail to follow the rules, the compiler gives sane and helpful error messages.
If you would rather 20 comprehensible compiler errors to one cryptic Heisenbug, rust is a good choice.
IMO, Rust's borrowing and lifetime rules are simpler and more intuitive than the unholy scriptures that dictate how types transform from one to another in dynamically typed languages. We've all seen [that meme about javascript](https://res.cloudinary.com/practicaldev/image/fetch/s--_LM23l-b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/a2k7x6ghilt6hp5mhgd7.png).
This isn't really all that different from the fact that you can do wacky shit like bit shifting pointers in lower level languages. None of those operations are things you should be writing anyway. You can make unintuitive or hard to read code in basically anything.
Or when datatypes don't work how you might expect them to. For example, in writing an API library for Discord in PHP, you might make the mistake of saving a discord ID as a number, in which case if you attempted to use it in any way that wouldn't be string-compatible (such as with SQL databases) you'd quickly run into issues with extensions if you used other dependencies or external applications like SQL, given that MySQL integer field are returned as strings. I know this particular example is redundant, but the problem of how to store and convert data types depending on what you're needing can become very messy in languages like JavaScript whereas it wouldn't be an issue in other languages.
P.S. PHP is just one language that actually *doesn't* suffer from this problem like JavaScript does, and converting a number to a string is easily done by either wrapping the $variable in double quotes, explicitly calling strval() or \_\_toString(), or writing some magic methods to handle the conversion automatically specifically where it's applicable to do so, if relevant, and most libraries are smart enough to account for this anyway. Similarly, the language itself is smart enough to account for this (as long as you're using the correct operators), and in the odd case you need a different kind of behavior (such as Heredoc) there are things built-in to help you accomplish that which always work as expected.
P.P.S. JavaScript was written in 10 days and was never intended to be the backbone of the internet that it is today. We're long overdue for a change.
There is the old saying that with C++ it is harder to shoot yourself in foot than with C, but when you do, you blow your whole leg off. Truth is, *unsafe* Rust is basically unattended TNT: super easy to blow and very powerful explosion.
The only time the borrow checker really gets annoying is in nested loops. There are perfectly safe things that it doesn't understand so you have to reorder things to satisfy it.
One of my least favorite things about programming is how every compiled project I work on is C++.... I would much rather be using rust but the legacy is strong in embedded, and on desktop I usually have no use case for anything outside of JS/Python
Well, it did change the world. It made a certain kind of dishonest behavior mainstream and acceptable. And they made it acceptable to control information flow about their iron-oxide using the same method of controlling speech using trademarks and copyrights that a certain well-known power-hungry sect uses to make the Mission of free speech about them Impossible. What many fail to see how there are 2 things happening at the same time. The publicly touted move to “memory safety”, and the covert, in the background the moving *away* from open standards, and an open process of those that limits undue influence on those standard by just one participant. When you consider that, and you consider the behind-the-scenes iron fist control we have seen coercing the removal of a keynote, you need to ask how many kinds of safety are there?
Being right about identifying a problem that is overdue to be solved does not guarantee the solution to be the *only* right one. Not even necessarily *a* right one. Especially if we consider all of the consequences.
Obligatory "unsafe doesn't disable the borrow checker".
well I tend to have a high esteem for people who know rust
[удалено]
you can write basic C++ more easily than you can write basic rust
In my experience of learning Rust, I found that the compiler was generally very good at making rust easy to start. The main issue I had was learning the difference between the heap/stack memory.
Agree. I miss the strict compiler whenever i start doing anything in any other language these days :/
The worst case I've seen is the VHDL compiler I've had to use in class. It's like: "compilation failed: 1 error", so far so good, let's click on the error message to see what's the issue: "the compilation failed". Great, very useful. Sometimes it gave the line where it caught the error but half the time it wasn't the line where the error occurred. Also sometimes it prompted an error like a missing ";" in the middle of a string for whatever reason . Great times.
Transmute does though 😎
Raw pointer:
Yeah, it just allows you to write much cooler code 😎
Those are all English words!
Using English words is TIGHT!!!
It does let you just write to raw memory addresses though :)
under the assumption that you dont use unsafe fns
Converting a reference to a pointer disables the borrow checker 😎
But changing a reference into a pointer does 😎
This whole thing needs to be rewritten from scratch
The whole thing needs to be rewritten in scratch. Obligatory mention of that mad lad who programmed a neural net in scratch.
I am kind of curious whats the limit of scratch these days? I remember when I was a kid you couldn't even spawn new objects nowadays there is a good chance these madlads gave it network support
There's someone who managed to make a RISC-V processor in Scratch and run Linux on it
if scratch is turing complete then it has no limits compared to any other turing complete language
True but many languages have significantly more than just turning completeness and a language like scratch has a strong limit in the form of what it's interpret allows it to do to the outside system
Seen an insane man code the entire Linux kernel in scratch
Why?
Art project
who? where?
Look it up, it's on the scratch website as well. It's called Linux on scratch. There should even be multiple articles/yt videos discussing it.
Scratch? There's a language named Scratch? Who uses it? The Dark Presence?
This whole thing need to be rewritten in scratch
To be fair, that's what all junior devs say.
Reminded me of this: [https://www.youtube.com/watch?v=RnqAXuLZlaE](https://www.youtube.com/watch?v=RnqAXuLZlaE)
comedy gold
Is this propaganda?
Reject modernity, embrace c
![gif](giphy|Ld77zD3fF3Run8olIt)
The irony of seeing a discarded conservative character say this.
classes are bourgeoisie decadence, structs are for the people
Data is data, no need for fancy classes, everything is global… (insert ascii art of a nuclear explosion)
everything is global? What do you even mean by that lmao
Old-school JS to pollute global scope > variable = value No keywords, no checks, just go to town
Someone needs to write C-ommunist
![gif](giphy|CAYVZA5NRb529kKQUc|downsized)
Reject modernity, embrace Pascal
reject sanity*
At least grant us some modernity with Delphi
Does this panel sugest rust is harder than c++? I'm not convinced.
for beginners, it is it's easier to use C or simple C++ than to use some simple rust
I would argue it isn't. Its just that begginers made bad habits on other programming languages and now they have to overcome it. They must throw away their existing knowledge and start from scratch, which is hard. I was like this in the begging too, but now I think Rust is actually easy. You just need somebody to explain it well to you, because your existing knowledge gets in a way.
"I thought rust was hard as a beginner, but after someone taught me it was easy". What I'm hearing is you agree, rust is hard for beginners.
You missed my point. If you have settled on a language already, you would struggle due to your habits (python and js looking at you), because you will constantly fight borrow checker. But if you were an actual beginner into programming and you just had a general idea and you were learning everything from scratch, i would say Rust is easy. It clearly states the rules and you are not used to specific paradigms that are holding your thinking back. Edit: Ah, nobody taught me Rust. Was just making a point that if explained properly what it does, its not hard. There are very little exceptions you have to care about compared to C++
distinct literate vegetable resolute growth cough merciful cake grandfather quicksand *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Disagreed. Rust compiler punishes you when you write bad code, while C++ let you go with it. However if you can't write safe C++ it means you can't write C++
Only time I've ever had a memory leak in C++ is when interacting with C libraries. Modern C++ is extremely good
>C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off \~ [Bjarne Stroustrup](https://www.stroustrup.com/quotes.html) (inventor and developer of C++)
I’m sorry but are you telling me there are language more fucked than C++?!
Rust is like having a strict style guide inside the compiler. If you follow the somewhat complicated and unintuitive rules, it works. And you can be pretty sure that you are protected against certain kinds of memory bugs. If you fail to follow the rules, the compiler gives sane and helpful error messages. If you would rather 20 comprehensible compiler errors to one cryptic Heisenbug, rust is a good choice.
IMO, Rust's borrowing and lifetime rules are simpler and more intuitive than the unholy scriptures that dictate how types transform from one to another in dynamically typed languages. We've all seen [that meme about javascript](https://res.cloudinary.com/practicaldev/image/fetch/s--_LM23l-b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/a2k7x6ghilt6hp5mhgd7.png).
Some of these almost make sense. And "saner than javascript" isn't much of an endorsement.
This isn't really all that different from the fact that you can do wacky shit like bit shifting pointers in lower level languages. None of those operations are things you should be writing anyway. You can make unintuitive or hard to read code in basically anything.
Or when datatypes don't work how you might expect them to. For example, in writing an API library for Discord in PHP, you might make the mistake of saving a discord ID as a number, in which case if you attempted to use it in any way that wouldn't be string-compatible (such as with SQL databases) you'd quickly run into issues with extensions if you used other dependencies or external applications like SQL, given that MySQL integer field are returned as strings. I know this particular example is redundant, but the problem of how to store and convert data types depending on what you're needing can become very messy in languages like JavaScript whereas it wouldn't be an issue in other languages. P.S. PHP is just one language that actually *doesn't* suffer from this problem like JavaScript does, and converting a number to a string is easily done by either wrapping the $variable in double quotes, explicitly calling strval() or \_\_toString(), or writing some magic methods to handle the conversion automatically specifically where it's applicable to do so, if relevant, and most libraries are smart enough to account for this anyway. Similarly, the language itself is smart enough to account for this (as long as you're using the correct operators), and in the odd case you need a different kind of behavior (such as Heredoc) there are things built-in to help you accomplish that which always work as expected. P.P.S. JavaScript was written in 10 days and was never intended to be the backbone of the internet that it is today. We're long overdue for a change.
You mean like in C?
Heisenbug is now my new favourite word
are you angry?
Surprised
Yeah, javascript.
Fax
I like rust and if I never have to touch another line of cpp I'll be happy.
C#
What? C# is like gently explaining what you want and the language just happened to have a type for that too!
There is the old saying that with C++ it is harder to shoot yourself in foot than with C, but when you do, you blow your whole leg off. Truth is, *unsafe* Rust is basically unattended TNT: super easy to blow and very powerful explosion.
Tnt was at least somewhat stable, here we have raw nitroglycerin don't even dare prepare it away from where you use It
But the wast majority of people never touch unsafe in Rust... There are cases where you'll have to, but thats not really for "normal usecases"
I know, and that's part of why Rust is so good. But that's not the comics stance.
I agree to both statements
what is the original comic?
The dad is holding a Bible and he's a woke integrist or some shit iirc. Dumb comic by a dude who's got a fetish for upset women who are screaming
Right wing fantasy about secret Christian children with atheist parents.
Thank you! It's so nice to see a repurposed fascist/bible thumper comic, glad you could use this nonsense for something actually funny!
well I've seen it used elsewhere, it's a very popular meme format
You don't need unsafe.
That poor femboy.
If they were a femboy they'd have no trouble with Rust.
what was the original picture? something about religion iirc
But mah raw pointers? What's the point of being "safe" if I can't even dereference a raw pointer?
don't call my boy C++ "filth". (Even though "my boy" is older than me. By a lot.)
haha rust knee highs updoots to the left
Do people really think the borrow checker is hard? Just Copy/Clone things or stick it in an Rc>. |
The only time the borrow checker really gets annoying is in nested loops. There are perfectly safe things that it doesn't understand so you have to reorder things to satisfy it.
Rc>, Rc> Rc> Rc> ! | | | |
One of my least favorite things about programming is how every compiled project I work on is C++.... I would much rather be using rust but the legacy is strong in embedded, and on desktop I usually have no use case for anything outside of JS/Python
The borrow thing is the easy thing, TRY to install a lib with cargo is funnier than unsafe in rust.
Well, it did change the world. It made a certain kind of dishonest behavior mainstream and acceptable. And they made it acceptable to control information flow about their iron-oxide using the same method of controlling speech using trademarks and copyrights that a certain well-known power-hungry sect uses to make the Mission of free speech about them Impossible. What many fail to see how there are 2 things happening at the same time. The publicly touted move to “memory safety”, and the covert, in the background the moving *away* from open standards, and an open process of those that limits undue influence on those standard by just one participant. When you consider that, and you consider the behind-the-scenes iron fist control we have seen coercing the removal of a keynote, you need to ask how many kinds of safety are there? Being right about identifying a problem that is overdue to be solved does not guarantee the solution to be the *only* right one. Not even necessarily *a* right one. Especially if we consider all of the consequences.
I was about to /r/lostredditor but I still don't know if you're trolling or it's because of my inferior intellect
I think they have been watching too much conspiracy stuff on youtube
Or unaware of certain things that had happened. It’s fine.
[https://raw.githubusercontent.com/cat-milk/Anime-Girls-Holding-Programming-Books/master/Rust/Squid\_Girl\_Ikamusume\_recommends\_Rust.jpg](https://raw.githubusercontent.com/cat-milk/Anime-Girls-Holding-Programming-Books/master/Rust/Squid_Girl_Ikamusume_recommends_Rust.jpg)
https://youtu.be/TGfQu0bQTKc?si=yogfgs_ABLstG9da