Should i learn Go or Rust?

Should i learn Go or Rust?


C-cucks leave

Other urls found in this thread:

dl.acm.org/citation.cfm?id=358210
twitter.com/SFWRedditImages

C

Learn C.

You should learn you some Haskell. You will never need to learn another language again.

Who gives a fuck OP you're still not going to have a job or a family of you're own

>C-cucks leave

Grow up and stop using the word cuck you sound immature and retarded.

Learn Lisp

cuck

Go is cute I like it, the toolchain/development environment feels a bit too imposed though

learn C

ew functional
t.b.h. i'd use this
Cuck.
Cucks.

>ew functional

>t.b.h. i'd use this

error

C

C++11.

Neither.

Both are new-age trash.

It depends on what you want to do. If you want to whip up some safe-ish web servers or services, Go has better standard libraries and will be faster to learn.

If you want to write an OS from scratch, then Rust will hopefully be the way of the future and cool to know. It's got a more complex syntax and is overall harder to learn than Go, though.

If you don't know C, then learn C first. If you already know C, then learning either language becomes 50% easier.

C++
+
+

C#

epic cuck meme xDDddDDD
upboats xDDDD

this.
Also picrelated

FORTRAN

>Rust will hopefully be the way of the future
Rust is at least 5 years away from being actually usable, but it will never get there. C++ will kill it by then and nobody will even remember its name.

>this is somehow worse than ugly slow try-catch-finally bullshit
>this is somehow worse than magic number error codes

do explain yourself

I could have believed him were he referring to Rust's try! macro, which I admit is a pretty awesome way to deal with error values.

However, he seems to agree that Rust is "new-age trash" so we can safely conclude that he's not talking about Rust, and therefore just a retard.

What if I actually want a job though?

Learn Java or [spoiler]C++[/Spoilers]

If you want a job, go to a vocational school and learn to be an electrician or a plumber

I write C# for a living and I think Java/C# style exceptions are a terrible fucking idea.

At least with Go/Rust I have the freedom of deciding which errors are trivial and which ones aren't. .NET will just crash the entire thing because you created a MailMessage object with a bad email address.

Plus, if I need to account for multiple, different errors in a single block of code, I can do it in a way that's neatly laid out vertically in execution order rather than appending multiple catch() blocks at the end of my method. I don't have to guess which call throws an AccessViolationException and which one throws a FormatException or whatever the fuck.

I completely agree that exceptions are the "goto" of C++/Java/C#, except made slightly worse by the fact that "best practices" actively encourage people to only handle a small subset of errors.

I personally love Go's error handling, and the peace of mind you can get by knowing that all of your errors are explicitly dealt with (or at least explicitly disregarded) before you even run the program. Still, I can understand why someone used to exceptions would find it a hassle at first. Rust, on the other hand, has all of the benefits of Go's error return values but without the extra code thanks to try!. I wish Go had something similar, because I dislike several other aspects of Rust's syntax.

Why not both?
Go is fairly easy to learn, especially if you have programming experience already.
And then you can also learn some Rust. It's not like your brain is only capable of learning one language

I don't know why anyone hasn't said this already. In the real world, your boss won't ask you what languages you know. He'll just say "this project is in C#/Java/etc, start reading if you haven't used it before"

Go.

Syntax and language idioms take a day to learn. Standard library APIs, however, take a month.

You should definitely learn C.

>Standard library APIs, however, take a month.
Fortunately, you don't need to learn those for rust since its standard libraries become obsolete every month, even if they're technically "supported"

rust if you are making an OS, go if you just want speed and comfy

What do you think Python, Rust, Java, or Go are written in?

go is written in go but nice try

Stop tripfagging, tripfag.

Rust is written in Rust

An implementation of Python is written in Python
Rust is written in Rust
Go is written in Go

First version of the compiler was written in C for every one of those. If you have to compile your own compiler, the first one is also written in C.

And if you start out with just Linux, as in the kernel, you can't even start with C - then you need to write the first compiler in x86 assembler.

Learn C or assembler. It's what basically any other language builds upon.

Most likely a bait but

What language was the first ever C compiler written in? Possibly assembly for whatever the fuck architecture. You should learn that.

Yes. All compilers were written in assembly before C was created. It was the first high level language suitable for writing compilers.

Correct, PDP-7 Assembler to be specific. Dennis Ritchie wrote it so that he and Ken Thompson could rewrite UNIX from PDP-7 Assembler to C because while hand-written assembler is faster, it's also much more complex to write. However once you get too many abstractions (ie. languages written on top of languages written on top of assembler) you lose more and more efficiency.

>(ie. languages written on top of languages written on top of assembler

I seriously hope you don't believe this

Go

dl.acm.org/citation.cfm?id=358210 is an interesting example of why you might not want to trust your binary C compiler (true for glibc, bsd libc and every other binary C compiler, and every compiler built on a compiler that was made with that binary compiler - it's literally turtles all the way down).

In essense, the only way to counter the problem is to have your own C compiler that you trust with which to verify the source code with (so-called diverse double compiling), which is an almost unmanagable task with a modern OS (kernel + base system, even if Linux arguably has none).

The HolyC compiler was written from scratch in AMD64 assembler. Now it's self-hosted.

Assuming you're expecting your programs to run as fast as possible, you always want to compile down through whatever intermediate languages your languages first compiler was written in, all the way down to assembler.

I realise, however, that most people who program stuff nowadays aren't interested in that.

Maybe so, but you can't trust it unless you DDC it with your own AMD64 compiler. Do you have one?

OP here, I'm just gonna learn Go. The creators of C say go is better.

Gopher is retarded. Golang eror handling is irrelevant.
Fuck you.

>creators
Who?

>I want to look cool and elitist but I don't actually give a shit about technology, should I l earn Go or Rust? Which one is more edgy Sup Forums?

Learn OOP first, be useful, then learn those languages.

Err, meant gcc, clang, tcc, Visual Studio C compiler, et cetera and not the libraries.

>learn OOP
Learn C, then an OOP, then whatever else.

Give yourself a proper foundation, so that you might one day actually be useful.

>Assuming you're expecting your programs to run as fast as possible, you always want to compile down through whatever intermediate languages your languages first compiler was written in, all the way down to assembler.
>
>I realise, however, that most people who program stuff nowadays aren't interested in that.


Dude. You're assuming any language written in C transpiles into C and then to native, which is obviously incorrect. By that logic you can't write a better C compiler in C because it's going to be compiled by another C compiler.

All of Cs derivative languages (C++,C#, Objective-C, Limbo, Go, and probably some others) as well all the languages whose first compiler was written in C (Java, Python, Perl, and probably others) can be compiled into C and from there be compiled into assembly.

go

rust has no jobs lol

Rust isn't even stable yet, let alone mature.

Languages whose first compiler wasn't written in C can also be compiled into C and from there be compiled into assembly.

What was your point? The examples you gave don't compile to C, even if their compilers were originally or currently are written in C.

First compiler of rust was written in Ocaml, fucktard

No way.

That just means it's even further removed. OCaml was still written in C though.

You need to learn what compilers really do.

They don't compile to C and then to native. They compile directly to native. Of course I'm ignoring the IR level like LLVM.

Some compilers REALLY do transpile to C or other languages but that's not the norm.

So, they never do X, except when they do X?

You're sending me mixed messages user.

>Assuming you're expecting your programs to run as fast as possible, you always want to compile down through whatever intermediate languages your languages first compiler was written in, all the way down to assembler.
This is saying that if I write a poorly optimised X-language-to-native compiler in C, then later ditch that compiler and write a better one in assembly, I should suddenly start compiling X-language to C instead of native because the random fact that the "first" compiler was written in C, despite not interacting with the current compiler at all, will magically make my programs run faster.

The language that your compiler is written in is completely irrelevant. The performance of your program is entirely dependant on what the compiler outputs.

PHP

If you aren't good at C and C++ then you should learn those first.

Between Rust and Go, I would say Rust if you want to be sensible but Go if you want a job.

Go doesn't really need to exist, all the problems that it tries to solve are already solvable by existing languages like Java and Node.js with much better ecosystems, but everyone is getting on the Go bandwagon anyways because Google is behind it (just like AngularJS).

Rust on the other hand solves a real problem, but I don't trust Mozilla to do a good job with it. Already there are some missteps like with the crate system. In a utopia, Google develops Rust and it becomes the next C/C++, while Go gets developed by Mozilla but no one gives a shit.

Is there a compiler that can't do source-to-source compilation? If so, why the fuck does it exist.

And one of the tricks to optimizing code if you actually need to do that is to do source-to-source compiling down to C and then to assembly.

The captcha for this post was "Dead End", I'm taking that as a sign.
Good bye, thread.

>Already there are some missteps like with the crate system

Such as?

learn c

every language besides c was designed without practical application in mind. using any interpreted language like java for production code shouldn't be allowed, it just wastes time on the end user.

go is basically a java ripoff, trying to market to c/c++ audience.

don't even mention rust, it's a meme created by mozilla, the headquarters for sjw software

amen

you've been BTFO

dumbest meme Sup Forumsbabby post I've seen in my entire life

Go doesn't let you place curly brackets wherever you want and tries to tell you how to capitalize names. There is absolutely no reason for these "features" other than pure autism.

Rust is far from production-ready and I doubt it ever will be.

Learn C++.

Download Python and work on your algorithmics. Don't use all the "wow cool stuff" of python, keep it simple.

When it is done, learn C. To beginning, try to convert your basic algorithms in C. Then learn about the specificities of C. Work a lot with pointers, it's essential to understand how your computer works, how memory, stack, etc... works. Try system programming, networking, etc...

Then, try some fun OOP languages, like Python (complete, not only the simple part), C#, Ruby... and, alongside, try to learn the basics of assembly programming, with 64k asm for example.

Finally, the final boss, functional programming : Haskell, OCaml, ...

Note that I never mentioned Go or Rust.

>no LISP dialect
if you were a comic book character you'd be Bad Advice Man

And I forgot C++. Try to learn C++ after some "fun" OOP, like C#.

c++17 when?

>Go doesn't let you place curly brackets wherever you want
you will find that any modern development environment enforces style

Go just takes it one step further by making the compiler anal about it

having one predictable readable style across all code bases is more valuable than letting you put it in shitty places like on a newline or something

The most important part for Sup Forums street cred is that you hate IDEs and OOP and never produce anything useful. Now you can fit in

>>this is somehow worse than ugly slow try-catch-finally bullshit
>currentyear++;
ishygddt

has the spec not suffered enough already?

(((lisp)))

Haskell is too rigid. Forth is the true language to end all languages, and Chuck Moore is its prophet.

>It was the first high level language suitable for writing compilers.
Bullshit. There were compilers written in Lisp long before C even existed.

And they were completely unusable for real work, just like everything else ever written in Lisp.

>Such as?
the crate system

Learn Pascal ya dunce.

Learn C.

(Tfw too smart not to manage memory myself)

I'd say learn C.