Originally posted by uid313
View Post
Announcement
Collapse
No announcement yet.
Firefox 79 Is Ready To Ship With Safeguard On "_blank" Links, More Wayland VA-API Work
Collapse
X
-
Originally posted by rene View Post
You are not a developer, are you? It is not even a language issue, but some trial bitcode vs. link-time-optimization build system issue. Because apparently in 2020 we need to keep changing options and defaults every other months.
Rust seems pretty nice, but I have my doubts about the module system. You can't copy and paste code from into a module because they have modules inside the mod chapter if you put a module in an existing file so it is shared, but if you put it in a different file then you don't use the mod chapter because it is implicitly a module.
- Likes 1
Comment
-
Originally posted by uid313 View Post
Yes, I am. But I haven't used Rust much, I tried to use it but then it got tricky for me with gtk-rs.
Rust seems pretty nice, but I have my doubts about the module system. You can't copy and paste code from into a module because they have modules inside the mod chapter if you put a module in an existing file so it is shared, but if you put it in a different file then you don't use the mod chapter because it is implicitly a module.
- Likes 2
Comment
-
Modules may be painful, but is there a better alternative? To output native code compiled with all the flags and options you need, you either pull the source code for everything or you hope somebody else made available the binary .sos compiled exactly the way you need them. I don't see any way around that.
Fwiw, Golang also had an awkward way of dealing with dependencies. But they changed that after a while and are now also using something called modules. If Rust's modules fall flat on their faces, I'm sure they'll be replaced eventually. But you can't expect Mozilla (or anybody else) to drop a system just because you're uncomfortable using it. (Before you ask, no, I did not make the time to check how well Golang's modules work in practice.)
Comment
-
Originally posted by bug77 View PostModules may be painful, but is there a better alternative? To output native code compiled with all the flags and options you need, you either pull the source code for everything or you hope somebody else made available the binary .sos compiled exactly the way you need them. I don't see any way around that.
Comment
-
In the time it took you to record a YouTube video and advertise it here you could have just been a good open-source citizen and open a bug report.
It's likely just your specific configuration that's broken, since Nightly compiles and runs just fine here with Rust 1.45 and Clang 10.0.1 (no LTO, ThinLTO and xLTO).Last edited by johnp117; 28 July 2020, 06:01 PM.
Comment
-
Originally posted by uid313 View Post
Well in Python every file is a module and there is no way to declare multiple modules or nested modules inside a file. I am a novice and don't really know what I am talking about, but I find the Rust module system to be confusing. I really don't like inline modules and nested inline modules.
On the other hand, if it's modules that have you stymied and not lifetimes, I think you're doing pretty well
Comment
-
Originally posted by bug77 View Post
I'd say "don't like 'em, don't use 'em", but you can't control what cargo pulls in for you.
On the other hand, if it's modules that have you stymied and not lifetimes, I think you're doing pretty well
I am a pretty dumb guy so Rust is very difficult for me, but it seems like a pretty good language but personally I feel the module system is unnecessary confusing.
Comment
-
Originally posted by uid313 View Post
Well, everything in Rust is kind of difficult, and life times are very tricky too, and the Rc, Arc, Box, dyn box, and everything, but it is a low level language so naturally it is going to be difficult, and the stuff there is for good reasons to be able to handle memory in a safe way. That said, I do think I would like the module system more if it each module was in a separate file and it was not possible to declare inline modules and inline nested modules. I kind of like it when each module is one file, and each directory is a level in the namespace, and I do like it when there is one way to do something and not many different ways to do the same things.
I am a pretty dumb guy so Rust is very difficult for me, but it seems like a pretty good language but personally I feel the module system is unnecessary confusing.
Comment
-
Originally posted by rene View Post
Thank you for the marketing speak, now getting back to reality, you realize it is exactly this Rust code in Firefox, the project the initiated and Rust was written for, does not compile? One would expect that at least the latest version of these flagship project are written in a way to be compatible and work together.
- Likes 1
Comment
Comment