▲ 333 ▼ Why make it complicated? (lemmy.ml) submitted 1 year ago* by HiddenLayer555@lemmy.ml to c/programmer_humor@programming.dev 123 comments fedilink hide all child comments Made with KolourPaint and screenshots from Kate (with the GitHub theme).
[–] malware@lemmy.zip 11 points 1 year ago (17 children) That looks like rust ngl permalink fedilink source parent hideshow 17 child comments replies: [–] calcopiritus@lemmy.world 14 points 1 year ago (8 children) It's also valid rust syntax. But if it were rust, this meme would not make sense, since you would just type let a and type inference would do its thing. Which is much more ergonomic. permalink fedilink source parent hideshow 8 child comments replies: [–] nebeker@programming.dev 8 points 1 year ago (4 children) let a = String::from(“Hello, world!”).into() I’ll see myself out. permalink fedilink source parent hideshow 4 child comments replies: [–] anton@lemmy.blahaj.zone 4 points 1 year ago (3 children) At least be fair and cut out the .into() permalink fedilink source parent hideshow 3 child comments replies: [–] nebeker@programming.dev 3 points 1 year ago (2 children) And bow to the compiler’s whims? I think not! This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side. permalink fedilink source parent hideshow 2 child comments replies: [–] Haradion@lemmy.ml 3 points 1 year ago (1 child) If type constraints later in the function let the compiler infer the type, this syntax totally works. permalink fedilink source parent hideshow 1 child comment replies: [–] nebeker@programming.dev 1 point 1 year ago Like if the variable is then used in a function that only takes one type? Huh. permalink fedilink source parent [–] victorz@lemmy.world 1 point 1 year ago (2 children) Type inference is a pretty big thing in TypeScript as well though. In fact it's probably the biggest thing about it, IMO. permalink fedilink source parent hideshow 2 child comments replies: [–] calcopiritus@lemmy.world 1 point 1 year ago (1 child) I don't know typescript. But if that's the case, this meme doesn't make much sense. Who writes the types of variables in a language with type inference unless forced by the compiler? permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Maybe it's a language without type interference? Either way, it sometimes makes sense in TypeScript to help the type system out a little bit. let array: string[] = []; In this situation, the type system can't infer that the empty array should be a string array, because there are no items to go by. permalink fedilink source parent [–] WhyJiffie@sh.itjust.works 5 points 1 year ago (7 children) I was thinking the same thing. who would write typescript if they could just do Rust? permalink fedilink source parent hideshow 7 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago (6 children) I would because I know TypeScript and I don't know Rust. permalink fedilink source parent hideshow 6 child comments replies: [–] WhyJiffie@sh.itjust.works 1 point 1 year ago (5 children) ok but then you can't do Rust, so this does not apply. but if you did.. ! permalink fedilink source parent hideshow 5 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago (4 children) Probably would still use TypeScript, because I use that for work. 🤷♂️ Rust just seems like... a lot. Regarding Rust, I've seen a lot of praises and a not so insignificant amount of complaints that make me very hesitant to take the plunge. Can't remember off the top of my head what it was, specifically, but it was enough for me to write it off, that much I remember. permalink fedilink source parent hideshow 4 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (3 children) People really overstate it, it's not that hard. It has a reputation of being difficult because people use it for difficult, low-level tasks, OS stuff, parsers, cryptography, highly optimised serialisation, but those things would be hard in any language. For a newcomer it's, IMO, way easier than say C++, because it doesn't have a mindbogglingly huge std lib with decades of changing best practices to try to figure out. To do simpler things in it is really pretty straightforward, especially if you're already comfortable with a robust type system. permalink fedilink source parent hideshow 3 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago* (2 children) This contradicts what I've heard others say about it. I have a feeling it is quite subjective, and this might just be an anecdotal recommendation because you have an easy time with it. Maybe I will too! But maybe I won't. Either way, one part of me really wants to try it, but one part has very little time in life. 🥲 Also comparing it to C++ might not be the flex we think it is. 😅 permalink fedilink source parent hideshow 2 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] calcopiritus@lemmy.world 14 points 1 year ago (8 children) It's also valid rust syntax. But if it were rust, this meme would not make sense, since you would just type let a and type inference would do its thing. Which is much more ergonomic. permalink fedilink source parent hideshow 8 child comments replies: [–] nebeker@programming.dev 8 points 1 year ago (4 children) let a = String::from(“Hello, world!”).into() I’ll see myself out. permalink fedilink source parent hideshow 4 child comments replies: [–] anton@lemmy.blahaj.zone 4 points 1 year ago (3 children) At least be fair and cut out the .into() permalink fedilink source parent hideshow 3 child comments replies: [–] nebeker@programming.dev 3 points 1 year ago (2 children) And bow to the compiler’s whims? I think not! This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side. permalink fedilink source parent hideshow 2 child comments replies: [–] Haradion@lemmy.ml 3 points 1 year ago (1 child) If type constraints later in the function let the compiler infer the type, this syntax totally works. permalink fedilink source parent hideshow 1 child comment replies: [–] nebeker@programming.dev 1 point 1 year ago Like if the variable is then used in a function that only takes one type? Huh. permalink fedilink source parent [–] victorz@lemmy.world 1 point 1 year ago (2 children) Type inference is a pretty big thing in TypeScript as well though. In fact it's probably the biggest thing about it, IMO. permalink fedilink source parent hideshow 2 child comments replies: [–] calcopiritus@lemmy.world 1 point 1 year ago (1 child) I don't know typescript. But if that's the case, this meme doesn't make much sense. Who writes the types of variables in a language with type inference unless forced by the compiler? permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Maybe it's a language without type interference? Either way, it sometimes makes sense in TypeScript to help the type system out a little bit. let array: string[] = []; In this situation, the type system can't infer that the empty array should be a string array, because there are no items to go by. permalink fedilink source parent
[–] nebeker@programming.dev 8 points 1 year ago (4 children) let a = String::from(“Hello, world!”).into() I’ll see myself out. permalink fedilink source parent hideshow 4 child comments replies: [–] anton@lemmy.blahaj.zone 4 points 1 year ago (3 children) At least be fair and cut out the .into() permalink fedilink source parent hideshow 3 child comments replies: [–] nebeker@programming.dev 3 points 1 year ago (2 children) And bow to the compiler’s whims? I think not! This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side. permalink fedilink source parent hideshow 2 child comments replies: [–] Haradion@lemmy.ml 3 points 1 year ago (1 child) If type constraints later in the function let the compiler infer the type, this syntax totally works. permalink fedilink source parent hideshow 1 child comment replies: [–] nebeker@programming.dev 1 point 1 year ago Like if the variable is then used in a function that only takes one type? Huh. permalink fedilink source parent
[–] anton@lemmy.blahaj.zone 4 points 1 year ago (3 children) At least be fair and cut out the .into() permalink fedilink source parent hideshow 3 child comments replies: [–] nebeker@programming.dev 3 points 1 year ago (2 children) And bow to the compiler’s whims? I think not! This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side. permalink fedilink source parent hideshow 2 child comments replies: [–] Haradion@lemmy.ml 3 points 1 year ago (1 child) If type constraints later in the function let the compiler infer the type, this syntax totally works. permalink fedilink source parent hideshow 1 child comment replies: [–] nebeker@programming.dev 1 point 1 year ago Like if the variable is then used in a function that only takes one type? Huh. permalink fedilink source parent
[–] nebeker@programming.dev 3 points 1 year ago (2 children) And bow to the compiler’s whims? I think not! This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side. permalink fedilink source parent hideshow 2 child comments replies: [–] Haradion@lemmy.ml 3 points 1 year ago (1 child) If type constraints later in the function let the compiler infer the type, this syntax totally works. permalink fedilink source parent hideshow 1 child comment replies: [–] nebeker@programming.dev 1 point 1 year ago Like if the variable is then used in a function that only takes one type? Huh. permalink fedilink source parent
[–] Haradion@lemmy.ml 3 points 1 year ago (1 child) If type constraints later in the function let the compiler infer the type, this syntax totally works. permalink fedilink source parent hideshow 1 child comment replies: [–] nebeker@programming.dev 1 point 1 year ago Like if the variable is then used in a function that only takes one type? Huh. permalink fedilink source parent
[–] nebeker@programming.dev 1 point 1 year ago Like if the variable is then used in a function that only takes one type? Huh. permalink fedilink source parent
[–] victorz@lemmy.world 1 point 1 year ago (2 children) Type inference is a pretty big thing in TypeScript as well though. In fact it's probably the biggest thing about it, IMO. permalink fedilink source parent hideshow 2 child comments replies: [–] calcopiritus@lemmy.world 1 point 1 year ago (1 child) I don't know typescript. But if that's the case, this meme doesn't make much sense. Who writes the types of variables in a language with type inference unless forced by the compiler? permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Maybe it's a language without type interference? Either way, it sometimes makes sense in TypeScript to help the type system out a little bit. let array: string[] = []; In this situation, the type system can't infer that the empty array should be a string array, because there are no items to go by. permalink fedilink source parent
[–] calcopiritus@lemmy.world 1 point 1 year ago (1 child) I don't know typescript. But if that's the case, this meme doesn't make much sense. Who writes the types of variables in a language with type inference unless forced by the compiler? permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Maybe it's a language without type interference? Either way, it sometimes makes sense in TypeScript to help the type system out a little bit. let array: string[] = []; In this situation, the type system can't infer that the empty array should be a string array, because there are no items to go by. permalink fedilink source parent
[–] victorz@lemmy.world 1 point 1 year ago Maybe it's a language without type interference? Either way, it sometimes makes sense in TypeScript to help the type system out a little bit. let array: string[] = []; In this situation, the type system can't infer that the empty array should be a string array, because there are no items to go by. permalink fedilink source parent
[–] WhyJiffie@sh.itjust.works 5 points 1 year ago (7 children) I was thinking the same thing. who would write typescript if they could just do Rust? permalink fedilink source parent hideshow 7 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago (6 children) I would because I know TypeScript and I don't know Rust. permalink fedilink source parent hideshow 6 child comments replies: [–] WhyJiffie@sh.itjust.works 1 point 1 year ago (5 children) ok but then you can't do Rust, so this does not apply. but if you did.. ! permalink fedilink source parent hideshow 5 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago (4 children) Probably would still use TypeScript, because I use that for work. 🤷♂️ Rust just seems like... a lot. Regarding Rust, I've seen a lot of praises and a not so insignificant amount of complaints that make me very hesitant to take the plunge. Can't remember off the top of my head what it was, specifically, but it was enough for me to write it off, that much I remember. permalink fedilink source parent hideshow 4 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (3 children) People really overstate it, it's not that hard. It has a reputation of being difficult because people use it for difficult, low-level tasks, OS stuff, parsers, cryptography, highly optimised serialisation, but those things would be hard in any language. For a newcomer it's, IMO, way easier than say C++, because it doesn't have a mindbogglingly huge std lib with decades of changing best practices to try to figure out. To do simpler things in it is really pretty straightforward, especially if you're already comfortable with a robust type system. permalink fedilink source parent hideshow 3 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago* (2 children) This contradicts what I've heard others say about it. I have a feeling it is quite subjective, and this might just be an anecdotal recommendation because you have an easy time with it. Maybe I will too! But maybe I won't. Either way, one part of me really wants to try it, but one part has very little time in life. 🥲 Also comparing it to C++ might not be the flex we think it is. 😅 permalink fedilink source parent hideshow 2 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] victorz@lemmy.world 1 point 1 year ago (6 children) I would because I know TypeScript and I don't know Rust. permalink fedilink source parent hideshow 6 child comments replies: [–] WhyJiffie@sh.itjust.works 1 point 1 year ago (5 children) ok but then you can't do Rust, so this does not apply. but if you did.. ! permalink fedilink source parent hideshow 5 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago (4 children) Probably would still use TypeScript, because I use that for work. 🤷♂️ Rust just seems like... a lot. Regarding Rust, I've seen a lot of praises and a not so insignificant amount of complaints that make me very hesitant to take the plunge. Can't remember off the top of my head what it was, specifically, but it was enough for me to write it off, that much I remember. permalink fedilink source parent hideshow 4 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (3 children) People really overstate it, it's not that hard. It has a reputation of being difficult because people use it for difficult, low-level tasks, OS stuff, parsers, cryptography, highly optimised serialisation, but those things would be hard in any language. For a newcomer it's, IMO, way easier than say C++, because it doesn't have a mindbogglingly huge std lib with decades of changing best practices to try to figure out. To do simpler things in it is really pretty straightforward, especially if you're already comfortable with a robust type system. permalink fedilink source parent hideshow 3 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago* (2 children) This contradicts what I've heard others say about it. I have a feeling it is quite subjective, and this might just be an anecdotal recommendation because you have an easy time with it. Maybe I will too! But maybe I won't. Either way, one part of me really wants to try it, but one part has very little time in life. 🥲 Also comparing it to C++ might not be the flex we think it is. 😅 permalink fedilink source parent hideshow 2 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] WhyJiffie@sh.itjust.works 1 point 1 year ago (5 children) ok but then you can't do Rust, so this does not apply. but if you did.. ! permalink fedilink source parent hideshow 5 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago (4 children) Probably would still use TypeScript, because I use that for work. 🤷♂️ Rust just seems like... a lot. Regarding Rust, I've seen a lot of praises and a not so insignificant amount of complaints that make me very hesitant to take the plunge. Can't remember off the top of my head what it was, specifically, but it was enough for me to write it off, that much I remember. permalink fedilink source parent hideshow 4 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (3 children) People really overstate it, it's not that hard. It has a reputation of being difficult because people use it for difficult, low-level tasks, OS stuff, parsers, cryptography, highly optimised serialisation, but those things would be hard in any language. For a newcomer it's, IMO, way easier than say C++, because it doesn't have a mindbogglingly huge std lib with decades of changing best practices to try to figure out. To do simpler things in it is really pretty straightforward, especially if you're already comfortable with a robust type system. permalink fedilink source parent hideshow 3 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago* (2 children) This contradicts what I've heard others say about it. I have a feeling it is quite subjective, and this might just be an anecdotal recommendation because you have an easy time with it. Maybe I will too! But maybe I won't. Either way, one part of me really wants to try it, but one part has very little time in life. 🥲 Also comparing it to C++ might not be the flex we think it is. 😅 permalink fedilink source parent hideshow 2 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] victorz@lemmy.world 1 point 1 year ago (4 children) Probably would still use TypeScript, because I use that for work. 🤷♂️ Rust just seems like... a lot. Regarding Rust, I've seen a lot of praises and a not so insignificant amount of complaints that make me very hesitant to take the plunge. Can't remember off the top of my head what it was, specifically, but it was enough for me to write it off, that much I remember. permalink fedilink source parent hideshow 4 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (3 children) People really overstate it, it's not that hard. It has a reputation of being difficult because people use it for difficult, low-level tasks, OS stuff, parsers, cryptography, highly optimised serialisation, but those things would be hard in any language. For a newcomer it's, IMO, way easier than say C++, because it doesn't have a mindbogglingly huge std lib with decades of changing best practices to try to figure out. To do simpler things in it is really pretty straightforward, especially if you're already comfortable with a robust type system. permalink fedilink source parent hideshow 3 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago* (2 children) This contradicts what I've heard others say about it. I have a feeling it is quite subjective, and this might just be an anecdotal recommendation because you have an easy time with it. Maybe I will too! But maybe I won't. Either way, one part of me really wants to try it, but one part has very little time in life. 🥲 Also comparing it to C++ might not be the flex we think it is. 😅 permalink fedilink source parent hideshow 2 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] porous_grey_matter@lemmy.ml 2 points 1 year ago (3 children) People really overstate it, it's not that hard. It has a reputation of being difficult because people use it for difficult, low-level tasks, OS stuff, parsers, cryptography, highly optimised serialisation, but those things would be hard in any language. For a newcomer it's, IMO, way easier than say C++, because it doesn't have a mindbogglingly huge std lib with decades of changing best practices to try to figure out. To do simpler things in it is really pretty straightforward, especially if you're already comfortable with a robust type system. permalink fedilink source parent hideshow 3 child comments replies: [–] victorz@lemmy.world 1 point 1 year ago* (2 children) This contradicts what I've heard others say about it. I have a feeling it is quite subjective, and this might just be an anecdotal recommendation because you have an easy time with it. Maybe I will too! But maybe I won't. Either way, one part of me really wants to try it, but one part has very little time in life. 🥲 Also comparing it to C++ might not be the flex we think it is. 😅 permalink fedilink source parent hideshow 2 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] victorz@lemmy.world 1 point 1 year ago* (2 children) This contradicts what I've heard others say about it. I have a feeling it is quite subjective, and this might just be an anecdotal recommendation because you have an easy time with it. Maybe I will too! But maybe I won't. Either way, one part of me really wants to try it, but one part has very little time in life. 🥲 Also comparing it to C++ might not be the flex we think it is. 😅 permalink fedilink source parent hideshow 2 child comments replies: [–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] porous_grey_matter@lemmy.ml 2 points 1 year ago (1 child) Well sure, I guess you're right, it's definitely a bit subjective and some people have an easier time with some languages and ways of thinking than others for sure. And I didn't really mean to say that it was totally super easy, but... no kind of programming is really super easy. It is quite different and that in itself has a learning curve. My recommendation is for sure anecdotal, but I think the point about it seeming more difficult than it really is because people often use it for difficult stuff is actually true. permalink fedilink source parent hideshow 1 child comment replies: [–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent
[–] victorz@lemmy.world 1 point 1 year ago Take my up vote. I agree with everything in that comment. 👍 permalink fedilink source parent