> dude, programming is not that hard lmao
dude, programming is not that hard lmao
> rust
Do they actually have a rust text book?
It's not a book it's a picture of a computer monitor reatard
if you think this is complex, programming isn't for you
never used Rust but this can be easily understood
Explain it to me then. Go on. Line by line.
>Rust is the SJW™ SafeSpace™ based C+=™
use std::google:Diversity;
//Declare variable
Xir GenderFluid dTrump;
This isn't so much hard as it is verbose. The text seems to be talking about generics. Though I understand how it might look intimidating if you don't have prior experience in programming.
You're right it's super difficult you better stop trying and leave it for the real smart people who are good at hard stuff
this is a verbose definition of an add function for complex type numbers
>soyntax
It's some kind of generalization of an add function for a generalized collection.
Caveman speak: big list now stores anything rather than just specific type of thing
t. not a good programmer
Itt: arrogant programmers who like inhaling their own fart
>reatard
>I'm a literal retard
that's not hard
thats just understanding rust's syntax
No it's not but apparently printscreen is
I have never seen Rust before and I can still tell exactly what that's doing.
That said yeah, programming is not for everyone.
Implements Add interface (read is + operator overloading) for Complex of type L with type R resulting into type O, assuming there already is implementation of L+R => O.
I don't really know what do you want to explain about it, it's quite explainatory. Maybe generics aren't for lesser minds.
I make webpages yet I cannot understand a single line but the first one
>I will never in my life be good with software and programming
It's like a limit for me. No matter how gud I get in anything else, I will infinitely approach proficiency in software, but never actually reach proficiency and understanding.
I fucking hate myself.
Proficiency is not some certificate you get.
there's a shitload of stuff you can do with even just basic programming. you don't always need to reinvite some hash algorithm or create your own memory model or some gay shit like you see in journals.
Rust is not a beginner programming language. Try C or C++ for easier experience.
It really isn't that hard. The first thing you learn in any language is how to read its basic syntax, and after that if you're familiar with any language with operator overloading and strong types you'll understand what's going on.
this.
for me, it's mostly automation and file organization. it feels so good to not always be at the mercy of a 3rd party program to accomplish something simple.
>Low level language is not a beginner programming language.
>Try a low level language or a shitty mess of a high level language for easier experience.
???
>explainatory
language specifications are hard to read.
>bring into scope the "Add" trait from std::ops
>Implement, using the type variables L, R, and O, the trait "Add to some Complex number of real number type R" for the type "Complex number of real number of type L"
>where the aforementioned type L implements addition between L and R with an output of the O
>let the output type (of addition on complex numbers, the trait this whole thing is implementing) be of type "Complex number of underlying real number type O"
>implement the Add trait method "add", taking self by move, and "right hand side" Complex, and returning the associated trait "Output" type (Complex in this case).
>construct a new Complex number struct with the real and imaginary parts being the sum of the corresponding real and imaginary parts of self and "rhs".
C is actually pretty easy and straight forward to learn. C++ is the same but it takes a bit more time because it has more grammer.
That feel when my only programming experience is with ladder. (PLC)
How you guys even know where to begin?
The delusions of a C++ programmer
>Post dat pic where "How to learn C++ in 21 days"
What do you mean?
You can learn the syntax for most languages in a month.
The hard part is learning everything involved with making good software, which takes 5 years minimum and is a never ending progress/a skill.
I guess it would be hard for the sort of person that takes pictures of their computer screen.
>rust
>
That doesn't look difficult.
we feel sorry for you.
>Maybe generics aren't for lesser minds.
Which is why the brainlet-oriented google-made golang doesn't have them
This is stupid, it's like saying writing is difficult with Shakespeare pic.
Programming is easy, programming complex stuff isn't.
>complex stuff
>addition
generic Add for complex types. It adds the imaginary and real components of the complex vector which is some sort of object.
Literally the tmpl and the innermost line. Are you Sup Forumsentoomen really this bad?
>use std::ops::Add;
Import a module of some sort called Add from the standard library.
>tmpl Add for Complex where L: Add
This is some sort of template which will add a Complex of type a R to a Complex of type L, where L implements the Add interface for argument type R and output type O. Note that these single-letters are placeholder types. They could be anything, as long as L can Add R and return O.
type Output = Complex;
Declare a type called Output, which is a Complex of type O.
>fn add(self, rhs: Complex) -> Self::Output {
Define a method which operates on this object, and takes an argument of type Complex (just like we required in paragraph 2). The method returns an object of type Output (we defined just before).
>Complex {re: ....
Construct and return a Complex object by adding the matching elements for the right hand side and left hand side. And here, we finally see that a Complex is basically just a 2-element vector. So, like a complex number, except it doesn't actually have to be a number, thanks to generics.
And by the way, I don't even know rust and have barely seen it before.
I figured this out based on my knowledge of programming languages, leaning heavily on what I learned about Generics, having spent time in Java and C#.
golang pisses me off with its extreme veneration for simplicity. Every time I finish a go program my mind feels numb.
Why was that language even invented? Its not like we need any more languages.
>redditor doesnt understand the difference between ironic stupidity and actual stupidity
Color me surprised.
A half-assed Rust, basically
dumb phoneposter
the syntax is pure shit
then use an easier language
Well, basic shit like your picture really isnt. Especially when everything is written out like that.
Now getting some general task without any guidance with bigger requirements like time and memory optimization, that shit is hard. Tweaking your code all the time and seeing how bugs pop up everywhere and being forced to stomp in your whole solution because its shit is frustrating as fuck. And the absolute peak of suffering is when you have to work with others, using some wonky modular approach, fuck that shit.
What's up with the photo of monitors meme?
Is this post-irony?
these
>Maybe generics aren't for lesser minds.
>faygo
betcha she does sum real degenerate stuff at dcgcon
complete proficiency and understanding is an ideal to strive for, not something you wait to reach before doing shit
Fuck others.
hah nigga got you to spoonfeed him
every time
see
sadly no
to be fair code generation and static dispatch has a big impact on compiler and linker complexity and compile times
but since go's interfaces are lies (operators are not interface-based) and dynamic dispatch is slower, it's not even good solution for any type abstraction
That looks needlessly complex.
it's simple enough if you've seen some rust before or understand the basics of c++ templates
because there isn't any perfect language already
it's also needlessly useless example that just saves two manual type casts by putting them into operation implementation
but it's cleaner slightly cleaner than C++ templates
It literally is complex though.