[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Rust

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 59
Thread images: 2

File: e58bttya1pyzhsgjavfa.png (37KB, 400x400px) Image search: [Google]
e58bttya1pyzhsgjavfa.png
37KB, 400x400px
Will this programming language change the world by making systems programming accessible to the masses?
>>
>>61352773
Rust will never be taken seriously simply because it's made by Mozilla
>>
>>61352773
It's happening, I'm getting paid to write Rust right now, and I'm not working for Mozilla.

I'd say in 1/2 years it will have taken off for real.
>>
>>61352773
maybe
/thread
>>
Meme language that is not even half as elegant or useful as its fanboys make it sound.
>>
Serious question: why is it so fucking ugly?
>>
>>61352773
It won't change the world, but it might make my job slightly more pleasant. Only time will tell.
>>
>>61353322
Because they took syntax ideas from C++.
>>
redoxOS looks promising OP
>>
>>61353322
bastard child of c++ and ml ... mixed with the most retarded coding style
>>
>>61352785
better than golang desu
>>
>>61353363
>>61353322
Waaahh, the syntax for generics is slightly hairy, waaaahhhhh.

Come up with a better unambiguous syntax for an Algol like language and I'll send you dragon dildos.
>>
>>61353681
Unironically Java or C#
dildos pls
>>
>>61353681
I don't think that is what >>61353363 >>61353322
are complaining about.
>>
But C is accessible to the masses.
>>
>>61352773
systems programming is a niche that doesn't have to be accessible to the masses
>>
>>61352773
I think knowledge of heap/stack and memory management is necessary to understand Rust. If you've used C shit makes sense and is quite elegant. Without proper knowledge "masses" will constantly be confused about thing like strings or won't understand why they need to things in a certain way.
>>
>>61353788
Just browse github for C ini parser or check out enlightenment or libexif and see what happens when C meets the masses.
And given how bad flex and bison are, C most likely shouldn't even meet experienced programmers.

Also >>61353790, but of course that doesn't mean that RAD languages should be slow.
>>
>>61353836
>flex and bison are bad
Is there anything that does their job better?
>>
I would even put up with that pile of overcomplicated garbage if it only compiled much faster. But I'm *not* getting myself into another c++, that drained all my love for programming away
>>
>>61353836
>C most likely shouldn't even meet experienced programmers.
What are you talking about?
Just pick up K&R and work on it seriously, it's not hard to learn C.
>>
>literally every non-trivial library has 6 gorillion instances of 'unsafe'
utterly useless language
In any case, C++14 and 17 already stole its thunder
>>
>>61353916
>still no portable networking library in the standard
reee I want it now
>>
>>61352785
Rust gets funds from mozilla and other sources, it's backed by mozilla, not made by it. Also, mozilla stood up for open source more than any other companies. The irrational hatred towards mozilla is entirely sponsored by Microsoft and Google.

Rust will not flourish because of a different reason. It takes away the fun in programming. Perhaps if there was a language that is based on Rust and is not pedantic over security it would beat C/C++ quite easily.

In fact, people are fed up with C/C++ so much that if there is any new systems language that does not have GC and easy to program with, most people will jump ship.
>>
>>61353844
In terms of proper encoding support and usage, ANTLR or Lemon.
In terms of algorithms, any marpa parser.
In terms of ROI, any handwritten recursive descending parser.

>>61353885
>it's not hard to learn C.
It isn't. It is tedious to use it and moronic when for almost any task there is a better tool. The complete language environment is abysmal to a degree where JS can compete in terms of quality.
And what's worse, people who learn C first have to unlearn the ad hoc ways of utter garbage like void pointers and textual replacements or learn the fact that preallocated, dynamic arrays almost always beat linked lists on modern computers because for some reason most C material teaches linked lists.
>>
>>61353969
C++ is meant for windows
>>
>>61354002
The C++ spec is not tied to any one OS.

>>61353993
>lemon
I kinda forgot this existed, might give it a try next time I need a parser.
>>
>>61353993
C is a good first language precisely because it's tedious. Certainly much better than learning bad habits with Python, at least.
>>
>>61354033
stdlib is
>>
>>61353980
This 2bh
>>
>>61354038
In what way is the C++ standard library meant for Windows?
>>
>>61354036
>something is good because it's tedious for no good reason
You know, that argument only works if that tedium came with an advantage like proper code.
Instead, every C programmer is a sloppy waste of food.

>Certainly much better than learning bad habits with Python, at least.
>Comparing shit to piss.
Ok.
>>
>>61354108
What's a good first language then?
>>
>>61354134
>good first language
That's not a good measure, since a good first language isn't neccessarily something you'd actually want to program in.
A good first language is anything that teaches quickly about variables (not even necessarily static typing or manual memory management) and basic flow control up to functions and then can be discarded for a industry standard, feature rich programming language.
There just shouldn't be retarded things like header/implementation, shitty set up procedures and bizarre conventions in the way.
So stuff like Logo, Pascal, Lua, Kotlin (because it can be reasonable subsetted), Quorum etc goes with a reasonable instructur.
>>
>>61353757
Java and C# generics are a joke, no wonder their syntax is simpler.

>>61353769
Everything else is typical in Algol family languages.
>>
>>61352773
Short answer: No.
>>
>>61353980
Kek. The only thing sponsored by Google is Mozilla itself. I bet Chrome development cost Google a fraction of the money they paid them.
>>
>>61354669
>Algol family languages
That alone is not such a virtue. Well, according to the scientists that created Quorum.
>>
>>61353322
>>61353333
>>61353681
>>61353769
This is a function that takes two strings and returns the longer one. And it's ugly as fuck.
fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
if x.len() > y.len() {
x
} else {
y
}
}
>>
>>61355062
what the fuck is even 'a
>>
>>61355062
Lifetime, it tells the compiler that the input parameters have the same lifetime as the output
>>
>>61355108
IIRC it's meant for static lifetime
>>
>>61355181
why can't the compiler figure that out on its own?
>>
>>61355208
did you just assume its lifetime?
>>
>>61355062
Why would one do that?

do something like
strings.sort().nth(1)
>>
>>61355208
It can, this is a retarded example that could be written without the 'a's.
You have to specify it when there's more than 1 lifetime
>>
>>61355225
Not the same
>>
>>61355062
>>61355208
>>61355225
>>61355227
>this is a retarded example that could be written without the 'a's.
This is the lifetime tutorial straight from the official Rust Book.
>>
>>61354669
C# generics are decent but Java is nothing more than a fucking typecast macro
>>
>>61355599
Those two statements are not mutually exclusive
>>
>>61355062
fn longest<T: AsRef<str>>(a: T, b: T) -> T {
if a.as_ref().len() > b.as_ref().len() {
a
}
else {
b
}
}

fn main() {
println!("{}", longest("you", "faggot"));
}


> rustc op.rs
> ./op
faggot
>>
>>61353681
>>61354669
>Algol like language
>typical in Algol family languages

>saying Algol when you mean C
Algol family languages do not have any of this retarded crap. Algol 60, Algol 68, PL/I, Pascal, Ada, and Eiffel do not have any syntax (or semantics) as disgusting as C, C++, or Rust.

>>61354884
>Well, according to the scientists that created Quorum.
The Quorum people were talking about C syntax, not Algol family language syntax.
>>
File: 15726613.jpg (24KB, 455x628px) Image search: [Google]
15726613.jpg
24KB, 455x628px
>>61356052
><T: AsRef<str>>
>>
>>61353681
>slightly hairy
Thats a big fucking understatement
>>
>>61352773
>masses

That is a goal of GuixSD, by using and easily learned language like Scheme in order to configure and administrate their own systems down to fine details, plus be able to install packages without needing root access so the masses can now use Guix pkg mgr to install whatever they want at work or school instead of having to fill out paperwork and req T. Pajeet sysadmin to install proprietary software for them as he holds admin passwords.

Data is also never destroyed in these systems, taking snapshots that can be rolled back so the average joe has no fear of losing all data anymore if he fucks up some config option.

Rust will just be some abstracted away lower level thing that no reg user will ever know about just like they don't know about C either.
>>
>>61356134
Point taken, typical in C-like syntax languages, still, the point still stands.

It's not any uglier than C, C++, C#, Java or whatever else.
>>
>>61352773
what's wrong with C?

anyway, since /g/ supports Rust I will avoid it. I learned my lesson
>>
>>61356337
Everything, also /g/ likes C and hates Rust, so you're getting it backwards.
>>
>>61352773
There are only two people in the planet who actually use this decrecated silly meme would-be language. The problem is, they both keep posting these pointless threads on 4chan.
Thread posts: 59
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.