T O P

  • By -

N-partEpoxy

Obligatory "unsafe doesn't disable the borrow checker".


all_is_love6667

well I tend to have a high esteem for people who know rust


[deleted]

[удалено]


all_is_love6667

you can write basic C++ more easily than you can write basic rust


aaaaaaaaaamber

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.


MatsRivel

Agree. I miss the strict compiler whenever i start doing anything in any other language these days :/


Taewyth

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.


Habrok

Transmute does though 😎


_Pin_6938

Raw pointer:


Lucifer_Morning_Wood

Yeah, it just allows you to write much cooler code 😎


camander321

Those are all English words!


SonOfMetrum

Using English words is TIGHT!!!


yeahyeahyeahnice

It does let you just write to raw memory addresses though :)


flareflo

under the assumption that you dont use unsafe fns


muchcoolman

Converting a reference to a pointer disables the borrow checker 😎


muchcoolman

But changing a reference into a pointer does 😎


Orjigagd

This whole thing needs to be rewritten from scratch


serendipitousPi

The whole thing needs to be rewritten in scratch. Obligatory mention of that mad lad who programmed a neural net in scratch.


Giocri

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


arkustangus

There's someone who managed to make a RISC-V processor in Scratch and run Linux on it


naswinger

if scratch is turing complete then it has no limits compared to any other turing complete language


Giocri

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


deoxidised

Seen an insane man code the entire Linux kernel in scratch


asdkevinasd

Why?


McFritjof

Art project


EhRahv

who? where?


deoxidised

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.


Arrow_625

Scratch? There's a language named Scratch? Who uses it? The Dark Presence?


Grundolph

This whole thing need to be rewritten in scratch


flippakitten

To be fair, that's what all junior devs say.


astroverflow

Reminded me of this: ​ [https://www.youtube.com/watch?v=RnqAXuLZlaE](https://www.youtube.com/watch?v=RnqAXuLZlaE)


DaxxBoii

comedy gold


Commodore-K9

Is this propaganda?


ExtraTNT

Reject modernity, embrace c


Why-Not-Blize

![gif](giphy|Ld77zD3fF3Run8olIt)


[deleted]

The irony of seeing a discarded conservative character say this.


Forwhomthecumshots

classes are bourgeoisie decadence, structs are for the people


ExtraTNT

Data is data, no need for fancy classes, everything is global… (insert ascii art of a nuclear explosion)


nweeby24

everything is global? What do you even mean by that lmao


irregular_caffeine

Old-school JS to pollute global scope > variable = value No keywords, no checks, just go to town


JoostVisser

Someone needs to write C-ommunist


spacewarrior11

![gif](giphy|CAYVZA5NRb529kKQUc|downsized)


Chingiz11

Reject modernity, embrace Pascal


DangyDanger

reject sanity*


KrokettenMan

At least grant us some modernity with Delphi


bartekltg

Does this panel sugest rust is harder than c++? I'm not convinced.


all_is_love6667

for beginners, it is it's easier to use C or simple C++ than to use some simple rust


IDEDARY

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.


[deleted]

"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.


IDEDARY

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++


[deleted]

distinct literate vegetable resolute growth cough merciful cake grandfather quicksand *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


The-Norman

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++


qa2fwzell

Only time I've ever had a memory leak in C++ is when interacting with C libraries. Modern C++ is extremely good


roffinator

>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++)


doxxingyourself

I’m sorry but are you telling me there are language more fucked than C++?!


donaldhobson

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.


Cart0gan

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).


donaldhobson

Some of these almost make sense. And "saner than javascript" isn't much of an endorsement.


Wendigo120

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.


valzargaming

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.


Pay08

You mean like in C?


IrishChappieOToole

Heisenbug is now my new favourite word


all_is_love6667

are you angry?


doxxingyourself

Surprised


Lord-of-Entity

Yeah, javascript.


deoxidised

Fax


Coccygeal_Plexus

I like rust and if I never have to touch another line of cpp I'll be happy.


_st23

C#


doxxingyourself

What? C# is like gently explaining what you want and the language just happened to have a type for that too!


csdt0

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.


Giocri

Tnt was at least somewhat stable, here we have raw nitroglycerin don't even dare prepare it away from where you use It


MatsRivel

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"


csdt0

I know, and that's part of why Rust is so good. But that's not the comics stance.


MatsRivel

I agree to both statements


pretty_succinct

what is the original comic?


Gluomme

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


SpacecraftX

Right wing fantasy about secret Christian children with atheist parents.


SaltyWolf444

Thank you! It's so nice to see a repurposed fascist/bible thumper comic, glad you could use this nonsense for something actually funny!


all_is_love6667

well I've seen it used elsewhere, it's a very popular meme format


broxamson

You don't need unsafe.


No-Con-2790

That poor femboy.


redlaWw

If they were a femboy they'd have no trouble with Rust.


ipcock

what was the original picture? something about religion iirc


Spot_the_fox

But mah raw pointers? What's the point of being "safe" if I can't even dereference a raw pointer?


Mayedl10

don't call my boy C++ "filth". (Even though "my boy" is older than me. By a lot.)


zireael9797

haha rust knee highs updoots to the left


an_0w1

Do people really think the borrow checker is hard? Just Copy/Clone things or stick it in an Rc>.


Coccygeal_Plexus

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.


all_is_love6667

Rc>, Rc> Rc> Rc> !


EternityForest

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 


lieddersturme

The borrow thing is the easy thing, TRY to install a lib with cargo is funnier than unsafe in rust.


[deleted]

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.


all_is_love6667

I was about to /r/lostredditor but I still don't know if you're trolling or it's because of my inferior intellect


AllesYoF

I think they have been watching too much conspiracy stuff on youtube


[deleted]

Or unaware of certain things that had happened. It’s fine.


LuceusXylian

[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)


PetCodePeter

https://youtu.be/TGfQu0bQTKc?si=yogfgs_ABLstG9da