Executes as fast as C while written as elegant and safe as Ruby

>executes as fast as C while written as elegant and safe as Ruby
>no nulls
>0-cost abstractions
>no data races
>based macros
>traits, generics, closures, iterators, enums, sum types
>elegant error handling
>fearless concurrency and parallelism
>quality libs that don't exist in any other languages (e.g. serde, clap, rand, reqwest, etc...)
>takes the best features of OO and FP and leaves the rest
>god-tier package management
>can be used anywhere from embedded systems to writing APIs and FOSS command line tools

Attached: dancing-ferris.gif (734x490, 258K)

Other urls found in this thread:

arewegameyet.com/
twitter.com/AnonBabble

C BTFO

inb4 muh discord tranny

Attached: rust lmao.png (600x600, 249K)

this thread was shit the last time you posted it

fn main() {
if let Err(e) = run() {
eprintln!("{}", e)
}
}

fn run() -> Result {
let s = std::fs::read_to_string("afile")?;
println!("{}", s);
Ok(())
}
This syntax is expressive and beautiful!

It's the same as Go. I like it.

nigger what the fuck am I looking at?

>It's the same as Go. I like it.
Are you legally blind, perhaps?

No, it's literally the same with some syntactic sugar to pretend it's not some 1980s stuff.

It's the same shit as C++, It does not matter how well and powerful your language is if its syntax is too complex and (in the case of rust, but perl does it too) too much expressive.
Languages need to be *practical* and rust is not

> It's the same as go
> but with different syntax

So Rust it's like Ruby, C++, and every other language?

Self hosting on x86 yet?

>written as elegant and safe as Ruby
This is strictly a step back from code written as elegantly and safely as C, user. There are many things one could say about ruby code, but "elegant" is not one of them.

>quality libs that don't exist in any other languages (e.g. serde, clap, rand, reqwest, etc...)

I wish the ecosystem was a little better desu. I'm coming over soon JVM Langs, so I'm spoiled.

C++ has exceptions which are completely different in that the exceptions have an arbitrary type and are separate form the return value.

Exceptions kind of have to be, they exist for handling errors which the callee has no way of correctly dealing with.
Just returning an error optional isn't reasonable when an error might occur deep in the construction of an object and have no way of being propagated sanely outside of the normal return path.

Attached: Literally+google+schnippen+schnappen+_0e6edf2388df017d649f66c1004681ee.jpg (1000x601, 110K)

I don't even know how to answer you.
stated that Rust syntax is like go syntax and if not blind he is just retarded.
If we are talking about features of the language it's even a worse statement and does not worth any answer

>d have no way of being propagated sanely outside of the normal return path.
That's why you deal with problems when they occurs

Jesus it's like all the worst parts of Haskell syntax tossed in to a blender with the entirety of C++. I love the idea of the language but that is awful. I had rust on my "learn over summer" list, but I guess it's time to look in to Zig.

Not possible unless you make literally everything in the language return an optional which must be checked. And that is completely incompatible with C.

Rust’s solution is to panic and crash your program when something that can’t be handled, like divide by zero.

> Not possible unless you make literally everything in the language return an optional which must be checked.

You check only the error in your application domain not the universe

So you just don’t check for all errors is what you are saying.
Exceptions exist so you can deal with errors in libraries and deeply nested code instead of just doing nothing. Even if you don’t check them, an uncaught exception can be useful information for finding out what went wrong.

>0 cost abstractions
Yeah

Attached: received_1255261577974179.png (433x567, 214K)

> Exceptions exist so you can deal with errors in libraries and deeply nested code instead of just doing nothing.
Exceptions are typed and belong to your domain space. In the same way you check error "values" when an error occur

What does that have to do with anything? You catch exceptions or you don't.
If you don't want them at all you can turn them off at compile time and let your program terminate or behave undefindely instead.

This is my problem with rust too. I love the idea of it but every time I look at rust code my eyes bleed

> What does that have to do with anything?
With this statement

>So you just don’t check for all errors is what you are saying.
You can't chack for all errors even with exceptions.
Return value and exceptions have the same power it's just a matter of when you deal with them

>Return value and exceptions have the same power it's just a matter of when you deal with them

They don't because, because a return value requires enumerating all possible error conditions the code could exhibit and passing those to the caller. There are also cases where you flat out can't do this, like for hardware exceptions. Your only option then is to crash.

Doing all of this error propagation also clutters up your code. There are probably a few error types you want to explicitly return, and a bunch that you don't. The ones you want can be returned by values, the others can throw an exception.

>Your only option then is to crash.
So you can't deal it with exceptions. This does not disprove that exception == error values

Rust can't deal with them because it doesn't have exceptions (by default), but languages with exceptions can. So exception =/= error values.

was it written in German?

It occupies a niche that no one is interested in.
If you want to do system programming, you're going to use C and C++, and if you want things like concurrency and memory safety, you're going to use Java or Go.

Where does that leave Rust? It has no killer feature that uniquely differentiates it, which explains why no one is using it.

Attached: r.jpg (640x425, 58K)

the absolute state of Jow Forums

>Language feature!
>Language feature!
>Don't you love all these language features?!

No. They saved me a few keystrokes for a very specific use case. And I traded those keystrokes for readable, consistent looking code across any codebase.

Ever since my team moved to Kotlin from Java, code reviews have been hell. Everyone hates review now, but if you ask those retards about Kotlin, they'll praise it for hours on end. When to save every keystroke under the sun, you lose clarity.

>Hehe don't you love these lambdas?

No, I mostly dislike them. I used to be able to high level reviews in the browser. Now I have to checkout the branch, open the IDE, and jump to definition at every other passed lambda just to understand what's going on.

Oh, and when you dare leave an anonymously passed class in there for clarity, half the reviewers foam at the mouth saying "replace with lambda!"

Never in my life have I said "you know what this language needs? Infix functions!"

I've worked on large native codebases. Large Java codebases. Large JS codebases. And now large Kotlin codebases.

Almost all Java code is readable and consistent. Non modern C++ is a nightmare. C is better. Kotlin is awful. Everyone's inherent style with Kotlin reads differently. Keywords like apply, let, by are non descriptive and confusing. Lambdas everywhere makes code unclear.

i want to eat that

wat do

Sounds like you need to write better code.

Do you think the fact that C code can be written on one line make the language shit? Get better programmers

I just want a sane subset of Rust reduced to its genuine innovations, with a less dog-vomit syntax, and about six fewer years of technical debt in the toolchain.

I've been fucking around with zig lang for a few hours now and feel ready to shill it a bit. Obviously that isn't enough time to actually form a real opinion, but I really like what I've seen so far. It's absolutely worth checking out if you want something that is like C but safer. I wouldn't use it for any real projects get, but it seems to fill a similar void to rust without as much bullshit. On the other hand, zig is trying to be "C but safer", so no FP features which makes sense for the language but is still on my wishlist.

>as fast as C
Idiotmatic C is not fast because of all the extra baggage that you have to account for when doing error handling.
>as elegant and safe as ruby
ruby has a neat standard lib but the syntax is so fucking gross it is only second to perl.
also, ruby/rails uncovered many many vulnerabilities over the years. so much for 'safe'.
>no nulls
None is no different than null. They both mean something has no value.
>0-cost abstraction
and the filthy devs/users want inheritance and use a 'military-grade' encryption as a hash. utterly pointless.
>no data races
would be nice if it wasn't autistically limiting even on single threads.
>based macros
you know something is wrong when you use macros even for print
>traits, generics, closures, iterators, enums, sum types
That is nice but OCaml and Haskell did it better. Also, Rust iterators are sepples-tier.
>elegant error handling
nothing new
>fearless concurrency and parallelism
*panics*
>quality libs that don't exist in any other languages (e.g. serde, clap, rand, reqwest, etc...)
AHAHAHHAHAHAHAHAHAA. You clearly don't know many languages.
Even shitlangs like Java and C# have better serialization built-in. C# also has DragonFruit which automatically parses arguments and calls the custom signatured Main() you made and even use the xml comments of Main as the help text. Rust can't even have stable > v1.0 libs so never mind competing with shitlangs.
>takes the best features of OO and FP and leaves the rest
Rust is quasi-functional and crippled OO. What a fine mixture.
>god-tier package management
only when you compare it to literally nothing.
>can be used anywhere from embedded systems to writing APIs and FOSS command line tools
Rust has no niche. The starting goal of having no-GC OCaml and replacing sepples was enough to call quits on this shit.

haha look it's a little crabber

>Lambdas everywhere makes code unclear.
typical brain-rotted enterprise retard

>Ok(())
ok

You can do concurrency in C and C++

Attached: 1548002499681.png (502x668, 351K)

Not counting Mozilla?

This forced meme is going to die soon enough.
I threw up inside.
tranny patrol?

Attached: D7h7uL0UIAABObM.jpg (1200x850, 221K)

Based&Rustpilled.

Attached: 1560591250880.png (767x639, 111K)

t. clueless webdev

Oh, this thread again.

But nothing has been changed since the last one.

Rust is amateurish crap like Ruby. It should be better researched before it reached 1.0.

Now everything is a fucking mess, beginning with cluttered syntax and over-"engineered" (because stupid webdevs lacking any solid CS background) semantics and you know, amateur compiler.

But, of course, exactly like Ruby, it is usable and has its fans who knew no better.

Those of us who have seen Miranda/Haskell and SML/Ocaml/Scala could only shrug

This is of very poor quality. Compared to masters like Kernigan it feels like a fucking printed blog.

Good writing is hard, so is good engineering.

just because you have a low IQ that doesn't mean the language is bad, retard

stop posting like a retard.

Can you say something about the language in question instead of some imagined abstract quantities inside your head?

say what? your retarded claims are not worth any answer

Apply is not as confusing as a for look the amount of times that I have had to fix broken for loops because the iterator, check, initializer were wrong blows my mind.
> Apply
> You have a vector & operation
> Do the operation to THE vector

I've seen Ocaml, and it only makes me like Rust even more.

These threads make me want to write something in Rust.

This code is shit. Why do you make this so complicated for yourself?

use std::fs;

fn main() {
match fs::read_to_string("afile") {
Ok(data) => println!("{}", data),
Err(err) => eprintln!("{}", err),
}
}

Are you a slav by any chance? This is certainly Slavic level of argumentation.

It's how the book teaches you how to structure your programs. It's not shit, it lets you do proper error management and also signal handling if you wish. It was originally a response to someone talking about having issues with propagating errors up to main.

but it looks ugly

Fast and safe are oxymoronic terms.
To be fast you need to execute code asap.
To be safe you need to check memory before executing anything.

Python can execute code without even compiling it. Is it the fastest language ever made?

>None is no different than null. They both mean something has no value
imagine being this retarded, I don't even understand how you retard have all that confidence while writing so much nonsense.

He's somewhat right, if he didn't talk about Rust.

>None is no different than null. They both mean something has no value.
Except you can't dereference None.
None and null only look the same in memory, but works completely differently.
>and the filthy devs/users want inheritance and use a 'military-grade' encryption as a hash. utterly pointless.
That doesn't have anything to do with 0-cost abstraction, not make it pointless in any way.
>you know something is wrong when you use macros even for print
That doesn't make macros any less useful. Using global objects for printing is even worse IMO.
>*panics*
That doesn't make rust's concurrency any less useful.
>Even shitlangs like Java and C# have better serialization built-in
I've used both C# and Java and none of them had such a great json handling like serde.
>Rust is quasi-functional and crippled OO. What a fine mixture.
What features of OOP you miss in Rust?

How is it over-engineered? What features would you remove from it?

Except that code doesn't even show what you gain from doing it like this, it's bloated and looks like shit.
Add 'use', add more operations, add a some return value etc.

Not if you check it during compile-time.

Presented without comment.

Attached: file.png (701x607, 64K)

Wanna know how I know you're a weeb?

The only anime I've watched in years is bobobo, and you can't deny that it's an excellent anime.

Man of culture.
Trap crab.

Ok

That's not gonna happen. The compiler literally can't build itself in a 32 bit address space.

Trab

More like crap.

>fearless concurrency and parallelism
>QUICK YOU *HAVE* TO RUN IN PARALLEL DO IT BEFORE ITS TOO LATE AAAAAAAAA
>B-B-BUT I CANT! AM TOO AFRAID

Attached: lain_stanza.jpg (1008x720, 63K)

Yeah but can you make video games

arewegameyet.com/

So no. It sucks.

which micros currently translate rust.

>be seething Cnile
>ask if Rust is ready for games
>SDL
>Vulkan
>FMOD
>math
>physics
>oops, Jow Forums was full of shit again
>damage control activated
>"HURR DURR DERS NO PRE-MADE MULTI MILLION DOLLAR GAME ENGINE LIKE UNREAL SO IT SUX"
Have sex.

You can't but it's not best fit for game logic. However Rust is perfect for making game engines. It allows you to get really good performance and safety, but that usually isn't that important if you just want to make a game.

I've tried to develop games with it. It's not impossible, but it's unnecessary hard. At this moment I use it for a game server and it's pretty comfy.

>You can't but it's not best fit for game logic.
You can but*

nvm, only ported to avr. into the trash.

Sorry but if there’s no engine there’s no future. You have no reason to reply to me.

What did you make in it? I want to make a hentai visual novel series based on feet and beastiality.

>if there’s no engine there’s no future
The day C came out, it had no engine. Keep coping.

>What did you make in it? I want to make a hentai visual novel series based on feet and beastiality.
Shitty meme game. Basically open-world Breakout in space, where you could freeze screen and mine asteroids in breakout style gameplay and then go keep going forwards the center of galaxy(No Mans Sky parody).

Visual Novel is such a simple game you can make it in literally anything without much trouble. Rust will be fine.
Still I'd make just Visual Novel engine in Rust and write script in some custom format.