Talk:Rust (programming language)
This is the talk page for discussing improvements to the Rust (programming language) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | Rust (programming language) has been listed as one of the Engineering and technology good articles under the good article criteria. If you can improve it further, please do so. If it no longer meets these criteria, you can reassess it. | |||||||||||||||||||||
|
![]() | This article is rated GA-class on Wikipedia's content assessment scale. It is of interest to multiple WikiProjects. | |||||||||||||||||||||||||||||||||||||||||||||||
|
![]() | Daily pageviews of this article
A graph should have been displayed here but graphs are temporarily disabled. Until they are enabled again, visit the interactive graph at pageviews.wmcloud.org |
|
|||
This page has archives. Sections older than 365 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
OO allusions
edit@War: @Ovinus: About the OO allusions (and there was also a statement about this in the GA review), I disagree that Rust is not OO. Rust is multi-paradigm and can be used for OO. See e.g. here. For that reason, I don't think we should emove mentions of objects, object system, etc. Is there something else we can do to clarify this better for readers? Caleb Stanford (talk) 13:42, 16 July 2022 (UTC)
- See also Object-oriented programming, Composition over inheritance. Although I don't think we should call them as "object"s because that is not the correct name, and not used except for trait objects (which are just vtables). 0xDeadbeef 14:38, 16 July 2022 (UTC)
- Adam Savage once said that "Every tool's a hammer." This does not mean that it is good idea to describe a tool by its hammer-like properties. As @0xDeadbeef mentioned, Chapter 17 of the Rust docs discusses the issue of how Rust is, and is not, OO. I think we should strive to not confuse the reader into thinking that Rust is a syntactically different C++, when it clearly is not. This came up on the lifetime section concerning "destructors". Again, the Rust docs talk about destructors, but in Rust they are not the same as C++ destructors. Suggesting that they are is inaccurate and confusing to the reader.
- I get that with a particular background one thinks of these things from that background. A person that comes from a C++ background will associate features of Rust "as" or "like" various C++ features or C# features or Haskel features, etc. I think we should avoid these associations except where there is a precise and unambiguous correspondence. War (talk) 16:28, 16 July 2022 (UTC)
- I confess I'm a bit confused by your response. I didn't say anything about C++. P.S. regarding influences in the lead, do you mind if we keep them in alphabetical order? The source doesn't explicitly state they're in order of how major they are and I am reluctant to make any sort of delineation between them, as we probably won't have good sources to back that up. Caleb Stanford (talk) 20:05, 16 July 2022 (UTC)
- As a C++ programmer but not a Rust one, a destructor in Rust looks quite similar to one in C++ and other OO languages, and is aptly named as such. My suggestion would be to state what has been said here: that Rust has some features usually associated with OO languages, but is not regarded as one. Hawkeye7 (discuss) 21:00, 16 July 2022 (UTC)
- I may have been sloppy in my edit about RAII by saying "object" rather than "value" (although [1] says "Rust enforces RAII (Resource Acquisition Is Initialization), so whenever an object goes out of scope, its destructor is called and its owned resources are freed"), but, even being agnostic on whether Rust is truly object-oriented, I don't think RAII is necessarily restricted to object-oriented languages, and several sources say Rust very frequently uses that pattern. Ovinus (talk) 21:26, 16 July 2022 (UTC)
- @Caleb Stanford 'regarding influences in the lead'. I put them in the order in which they are mentioned in the Rust documentation which seems better than an arbitrary alphabetical ordering. War (talk) 21:30, 16 July 2022 (UTC)
- I think we need a 3rd opinion then. The source doesn't say what the order represents, so it's giving more weight to the order than I think it merits. In particular, the current order suggests SML/OCaml had a higher impact on Rust than C++, but the source does not state that explicitly. The point of the alphabetical ordering is to be arbitrary and not assert anything in particular. Caleb Stanford (talk) 02:23, 17 July 2022 (UTC)
- Caleb Stanford, third opinions only work for disputes between two people. 0xDeadbeef 03:21, 17 July 2022 (UTC)
- I meant about about the major influences point. As far as I saw only War and I weighed in on that, did I miss something? Would you like to weigh in? Caleb Stanford (talk) 03:28, 17 July 2022 (UTC)
- Sorry, I didn't read enough context when I posted that comment. Regarding major influences, I think we shouldn't mention any specific languages in the lead at all, instead we could refer to categories/families of languages. 0xDeadbeef 04:24, 17 July 2022 (UTC)
- Okay, now we have 3 different opinions lol. Thank you for the input Caleb Stanford (talk) 05:09, 17 July 2022 (UTC)
- Sorry, I didn't read enough context when I posted that comment. Regarding major influences, I think we shouldn't mention any specific languages in the lead at all, instead we could refer to categories/families of languages. 0xDeadbeef 04:24, 17 July 2022 (UTC)
- I meant about about the major influences point. As far as I saw only War and I weighed in on that, did I miss something? Would you like to weigh in? Caleb Stanford (talk) 03:28, 17 July 2022 (UTC)
- Caleb Stanford, third opinions only work for disputes between two people. 0xDeadbeef 03:21, 17 July 2022 (UTC)
- I think we need a 3rd opinion then. The source doesn't say what the order represents, so it's giving more weight to the order than I think it merits. In particular, the current order suggests SML/OCaml had a higher impact on Rust than C++, but the source does not state that explicitly. The point of the alphabetical ordering is to be arbitrary and not assert anything in particular. Caleb Stanford (talk) 02:23, 17 July 2022 (UTC)
- As a C++ programmer but not a Rust one, a destructor in Rust looks quite similar to one in C++ and other OO languages, and is aptly named as such. My suggestion would be to state what has been said here: that Rust has some features usually associated with OO languages, but is not regarded as one. Hawkeye7 (discuss) 21:00, 16 July 2022 (UTC)
- I confess I'm a bit confused by your response. I didn't say anything about C++. P.S. regarding influences in the lead, do you mind if we keep them in alphabetical order? The source doesn't explicitly state they're in order of how major they are and I am reluctant to make any sort of delineation between them, as we probably won't have good sources to back that up. Caleb Stanford (talk) 20:05, 16 July 2022 (UTC)
- I disagree with delleting information on anything related to the OOP. Though, it seems like (according to the docs) that Rust isn't supporitng inhertiance in usual sense. This should be covered by the articles. AXONOV (talk) ⚑ 11:31, 2 June 2023 (UTC)
Addressing PR comments
editHere are the PR comments that were not addressed. Feel free to pick them up or tick them off if no longer applicable/already fixed. 0xDeadbeef→∞ (talk to me) 11:59, 7 July 2023 (UTC)
- History
- There's a gap of 5 years between the release of Rust 1.0 and the Mozilla layoffs. Is there anything you can say about that time? I think it was an important period for Rust's growth and adoption as a serious programming language.
- Partly done I've fixed the gap somewhat but we still need some work done here. 0xDeadbeef→∞ (talk to me) 12:52, 16 August 2023 (UTC)
- There's a gap of 5 years between the release of Rust 1.0 and the Mozilla layoffs. Is there anything you can say about that time? I think it was an important period for Rust's growth and adoption as a serious programming language.
- Syntax and Semantics
- You should have at least a sentence each defining
if
,while
, andfor
statements; while their meaning is self-evident to anyone that has imperative programming experience, we can't assume the reader does. - Put a comment before the last clause of the
match
statement explaining that the underscore matches any value.- Done 0xDeadbeef→∞ (talk to me) 00:34, 18 August 2023 (UTC)
- "Rust's design was more significantly influenced by functional programming languages." – The reference doesn't fully support this claim. It just says "one significant influence is functional programming", but it doesn't say that the functional influence was more significant than the influence from C and C++ (though that may well be true).
- Moot, as that has been reworded. 0xDeadbeef→∞ (talk to me) 11:15, 30 November 2023 (UTC)
- "the value of the last expression in the function will be used as the return value" – The way that the factorial example demonstrates this principle is a bit confusing. The last expression in the function is technically the entire
if
statement/expression, which in turn resolves to the last expression in whichever branch is triggered at runtime, but this two-step process may not be evident to the casual reader. I suggest splitting it into two examples, one showing a simple return likefn double(x: u64) -> u64 { 2 * x }
and another demonstrating thatif
statements can be used as expressions. - The types table would be a good place to mention that string slices in Rust are UTF-8 encoded.
- Done (not by me). 0xDeadbeef→∞ (talk to me) 11:15, 30 November 2023 (UTC)
- The row for references should state that the compiler enforces that the reference is non-null and valid.
- "
Option
values must be handled using syntactic sugar" – "Syntactic sugar" isn't the right term as constructs likematch
andif let
aren't syntactic sugar but rather core parts of the language, but anyway this statement isn't true. I can call.unwrap()
on anOption
and it will blow up if it isNone
. You should make it clearer here that while you can still crash your program in Rust by trying to access a null value, unlike in C or C++ this is handled by safely panicking instead of undefined behavior, segfaulting, or worse. - "Possibly null; safe to dereference" – Similar to my previous comment, this is debatable based on your definition of "safe".
- "Lifetimes are a usually implicit part of all reference types in Rust." – The syntax of this sentence is confusing. I suggest splitting it into two parts or two sentences, one about how every reference has a lifetime in Rust and one about how lifetimes usually don't need to be explicitly annotated by the programmer.
- "automatically assigns lifetimes to functions if they are trivial" – Unclear whether the antecedent of "they" is "lifetimes" or "functions".
- You should have at least a sentence each defining
- Features
- The paragraph about
let
in "Types and polymorphism" feels misplaced. Ditto the paragraph abouttype
aliases. - Some redundancy in the discussion of generics between here and the "Syntax and semantics" section.
- "The type system within Rust is based around implementations, traits and structured types." – Vague wording, not clear what this is meant to convey.
- "Structured types are used to define fields." – Another awkward sentence.
- "meaning that the type of all values is known at compile time" – It can't be true that the type of all values is known at compile time, if per the next sentence dynamic dispatch is possible as well as static dispatch.
- Include an example of a declarative macro.
- "Rust also has a library, CXX, for calling to or from C++." – Make it clearer that this is just a third-party library and not a part of the Rust language.
- The paragraph about
- Components
- "Components" is a bit awkward as a section title. It doesn't neatly fit "Versioning system", for instance. Perhaps "Tooling" or "Ecosystem"?
- Done. 0xDeadbeef→∞ (talk to me) 13:09, 7 February 2024 (UTC)
- Surely you can find an English-language reference for
rustup
?- Done. 0xDeadbeef→∞ (talk to me) 13:09, 7 February 2024 (UTC)
- "When a project is annotated with the crate-level attribute
#![no_std]
..." – Explain the difference between the three standard library crates and whyno_std
would be desirable.- Seems to be Already done. 0xDeadbeef→∞ (talk to me) 13:09, 7 February 2024 (UTC)
- "Components" is a bit awkward as a section title. It doesn't neatly fit "Versioning system", for instance. Perhaps "Tooling" or "Ecosystem"?
- Performance
- "Rust aims 'to be as efficient and portable as idiomatic C++, without sacrificing safety'." – This is cited to an individual blog post, which begins with the caveat "Note that this is my take only and not an official decree as to the design of the language by any means." Can you find a better source for this?
- Not done as moot as it was removed. 0xDeadbeef→∞ (talk to me) 13:18, 7 February 2024 (UTC)
- The discussion of modes is a bit orthogonal to performance. I think it should be introduced in a different section ("Features"?) and only brought up here as it directly relates to using
unsafe
to write faster code. - I know that this is a contentious issue, but it feels odd that this section doesn't directly compare the performance of Rust with C or C++ (or any other language) on benchmarks.
- Not done. Disagree with the use of benchmarks. Reliable sources' coverage on this is minimal and it doesn't seem appropriate for us to do benchmark stuff to compare languages. (speaking from experience benchmarks don't really measure things outside a specific use case) Comparison to memory safe languages seems good already. (written after this PR) 0xDeadbeef→∞ (talk to me) 13:18, 7 February 2024 (UTC)
- "Rust aims 'to be as efficient and portable as idiomatic C++, without sacrificing safety'." – This is cited to an individual blog post, which begins with the caveat "Note that this is my take only and not an official decree as to the design of the language by any means." Can you find a better source for this?
- Adoption
- My personal opinion is that lists like this should not include entries that aren't blue links, so I would remove Theseus. I would also remove
exa
as that article seems likely to not meet Wikipedia's notability guidelines. - As of recently, Rust support has landed in the Linux kernel, so this should be updated.
- I don't know if you can find a reliable source for this, but Rust is now the most common language used in Fuchsia (graph). You should find a better citation for this entry anyway as source code is a primary source.
- Not done mention of fuchsia was removed from the article
- My personal opinion is that lists like this should not include entries that aren't blue links, so I would remove Theseus. I would also remove
More substantive comments:
- Some omissions from the article that seem notable (not sure if reliable sources can be found for them, though)
- The ecosystem of third-party crates. This is briefly mentioned in the "Cargo" section but it's a much bigger part of Rust development than, e.g., C/C++ development, and I think it should be expanded.
- There's a lot of discussion online about the "Rust learning curve"; perhaps a sentence or two about it under "Adoption"?
- Done! 0xDeadbeef→∞ (talk to me) 18:16, 17 July 2024 (UTC)
- There is not a lot of information in the article about the implementation of the Rust compiler.
- I suggest re-working the "Adoption" section as in my experience list-based sections like this tend to accumulate cruft. Can it be converted into prose that highlights some of the more significant applications and libraries written in Rust? Ditto for the "Conferences" subsection.
- Done by me and Sohom Datta. Adoption section was prosefied, and conferences section removed. 0xDeadbeef→∞ (talk to me) 01:30, 23 November 2023 (UTC)
- The division of content between the "Syntax and semantics" and "Features" sections is not fully clear. For instance, why does the "Syntax and semantics" discuss generics, but the definition of types with
struct
andenum
is left to "Features"? - The presentation of material in the "Features" section needs some work. I left some specific comments above, but overall there are lots of places where the organization/flow is not clear.
- Some things to think about in terms of getting this article to featured status: (Disclaimer: I have neither written nor reviewed a featured article. However I have read many recent featured article reviews so I have a general idea of what the expectations are.)
- The bar for prose quality is higher for featured articles than good articles. I left some copy-editing suggestions, but if you're willing to wait a bit then the Guild of Copy-Editors could perform a more comprehensive copy-edit.
- I did not perform a full source check but I found a few places where the citation did not fully back the claim in the article. The featured article review process is really strict on source-text integrity and just a few discrepancies can be fatal to a nomination, so make sure that you've thoroughly checked your references.
Reader comments
editEx-programmer here (C, Smalltalk, Objective-C, Perl, etc) now working in another field. I really appreciated this article and learned a lot about rust from reading it carefully. I may choose to learn the language later. I wanted to point out that there were three spots I had to pause where some edits might be helpful to future readers:
- The material about lifetimes is quite technical, and the reader must rely heavily on the example to understand what is going on. However, given the rust syntax for this is a bit opaque, the example is hard to follow for a non-rust programmer. For example, I struggled to understand how the 'src lifetime on the struct was relevant to the example. Not sure if I missed something, but I think the action is mostly happening around 'cfg. It may be helpful to add a para more patiently explaining the implications of the statements in the example. As an additional related point, it wasn't clear to me whether these lifetimes have the effect of "extending" the time an otherwise shorter-lived reference is valid, or whether they have the effect of triggering a compile-time error if the constraints expressed in the code cannot be met.
- Done at last. The presentation will need to be improved with some further copyediting, but the bits and pieces should be there. 0xDeadbeef→∞ (talk to me) 04:59, 17 July 2024 (UTC)
- The material about trait objects is also quite terse. The definition of these objects is covered well, but then it goes to implementation detail. I think the section is missing text on how the appropriate vector element gets used at runtime when a method call occurs. I assume that all the elements of the vector must also express the Display trait, and that some kind of dynamic type-checking occurs to select the desired element. I also wonder if it is possible for the selection to fail if an appropriate type is not available. (If this wondering does not make sense, consider that all I know about rust is from this article, so there may an opportunity regardless to further clarify in the text.)
- Done I've clarified this in the section on trait objects. 0xDeadbeef→∞ (talk to me) 02:20, 15 August 2023 (UTC)
- The text under the heading Standard Library is quite terse and uses the term 'crate' without elaboration. Although the concept of crate is defined later (perhaps consider reordering sections) there isn't a lot there to explain what is in each standard library crate, or what the benefit of dividing the standard library into three crates is. There is a mention to excluding one of the crates, but I'm not sure what's in there and why I'd want to exclude it. May be helpful to consider what you would like a reader unfamiliar with rust to take from this section, or if it's needed if it falls more into 'how-to' than content 'about' rust.
Once again, appreciate the article. And as I don't know rust, I will leave it to others to consider changes. -- cmhTC 13:17, 22 July 2023 (UTC)
- This is very helpful feedback, thanks for taking the time to write down your experience reading the article! Caleb Stanford (talk) 16:25, 22 July 2023 (UTC)
a source for potential use
edithttps://www.infoq.com/news/2019/03/rust-npm-performance/ 0xDeadbeef→∞ (talk to me) 13:54, 19 November 2023 (UTC)
- Is infoq.com a reliable source ? Sohom (talk) 16:58, 19 November 2023 (UTC)
- I've seen it used on many articles, so presumably yes. I know ZDNet and Ars Technica are considered generally reliable per WP:RSP, but InfoQ hasn't been subject to much discussion. I've seen InfoQ's articles and they are generally pretty good. (much better than self-published sources on Medium and the likes) 0xDeadbeef→∞ (talk to me) 06:31, 20 November 2023 (UTC)
- I would personally not include it unless npm themselves publish something about this. The article is basically a summary of a whitepaper written by Rust devs, which is itself a primary source and I cannot find any other (unreliable/reliable) source mentioning this. Sohom (talk) 20:33, 20 November 2023 (UTC)
- I've seen it used on many articles, so presumably yes. I know ZDNet and Ars Technica are considered generally reliable per WP:RSP, but InfoQ hasn't been subject to much discussion. I've seen InfoQ's articles and they are generally pretty good. (much better than self-published sources on Medium and the likes) 0xDeadbeef→∞ (talk to me) 06:31, 20 November 2023 (UTC)
- Added! Caleb Stanford (talk) 20:33, 20 November 2023 (UTC)
- rv per my latest comments. Sohom (talk) 20:54, 20 November 2023 (UTC)
- is the white paper itself a RS in your view? I think it's a real thing, still looking for other sources. Thanks, Caleb Stanford (talk) 23:24, 21 November 2023 (UTC)
- IMO, the InfoQ source should be more reliable than the white paper itself. The white paper is a primary source. 0xDeadbeef→∞ (talk to me) 00:01, 22 November 2023 (UTC)
- is the white paper itself a RS in your view? I think it's a real thing, still looking for other sources. Thanks, Caleb Stanford (talk) 23:24, 21 November 2023 (UTC)
- rv per my latest comments. Sohom (talk) 20:54, 20 November 2023 (UTC)
possible sources for RustConf
editI agree with removing the Rust conferences section (WP:NOTDIR)), but I think RustConf alone deserves mention in the community section as the most widely known community gathering. A bit hard to find secondary sources, I have 1 2 or we could use YouTube sources like 3. Might also be worth asking if we want to mention any of the recent RustFoundation related controversies, which got plenty of coverage. Caleb Stanford (talk) 22:06, 29 November 2023 (UTC)
- We should definitely try to cover the Rust foundation controversies if there are good sources available. I am less sure about the reliability of the sources that you bring up. The analytics india mag article's author is
an AI enthusiast
, and the description of crablang (an unofficial, unmaintained fork) makes me think that it leans toward the unreliable side. 0xDeadbeef→∞ (talk to me) 23:58, 29 November 2023 (UTC)
Closure section
editCurrently, the closure section throws a parser-specific syntax at the user (and is the only section to that making it somewhat jarring), is there any way we can remove it from the article ? (It seems to be a transclusion of a part of a different article that makes liberal use of the parser syntax, which seems fine). Sohom (talk) 00:42, 11 December 2023 (UTC)
- That section isn't placed well. We should to restructure it, by giving it more sources, and some more natural flow. 0xDeadbeef→∞ (talk to me) 14:54, 22 March 2024 (UTC)
Automated memory management
edit@Wootery: I'm not sure I understand your recent edit -- the lead stated "without requiring the use of automated memory management techniques", so how are you reading this to imply Rust is hands off? It seems to be stating that Rust is hands on. Perhaps I don't know what you mean by "hands off". Thanks, Caleb Stanford (talk) 19:31, 25 January 2024 (UTC)
- Perhaps you're right, my thinking was that it seems to imply that Rust offers memory safety while not offering/requiring automatic memory management features, but Rust's borrower checker presumably counts as an automatic memory management feature, in that it isn't done manually by the programmer. For what it's worth, I see the Rust Book uses phrasing closer to what I'm proposing. Anyway, the next sentence clarifies by introducing the borrower checker, so not much hinges on this. Wootery (talk) 21:42, 25 January 2024 (UTC)
- I think I can see Wootery's point. Dropping things at the end of a scope, could be considered an "automated memory management technique". And the current sentence could suggest that automated memory management doesn't exist in rust. 0xDeadbeef→∞ (talk to me) 00:20, 26 January 2024 (UTC)
- Ah, thanks for clarifying, I see the issue now. I think the point was to suggest that Rust can (but need not) use reference counting, but I think this was very cryptically stated so we should just move that elsewhere. Edited to hopefully clarify, feel free to edit further. Caleb Stanford (talk) 17:36, 26 January 2024 (UTC)
- I think I can see Wootery's point. Dropping things at the end of a scope, could be considered an "automated memory management technique". And the current sentence could suggest that automated memory management doesn't exist in rust. 0xDeadbeef→∞ (talk to me) 00:20, 26 January 2024 (UTC)
FAC preparation
editAlright, after working on the article for some time I am optimistic that we would be able to push this to FA, making it the first ever featured article on a programming language. (which would make it featured eventually on the top left of Wikipedia's main page!!) Before we submit it to WP:FAC, here are some things to prepare:
- We need to address the comments above, there are a number of comments above in #Addressing PR comments as well as one under #Reader comments that are outstanding and still apply. If anyone has a book about Rust that can help expand the article's technical explanations to something that would be more understandable for a general audience please feel free to contribute! (some comments on the books: I've been trying to source with The Rust Programming Language 2021 edition but I couldn't find an ebook online that has the correct page numbers, if anyone can send me one please let me know, I have ebook copies of Rust for Rustaceans published by No Starch Press, Rust in Action by Tim McNamara, and Programming Rust published by O'Reilly if any wants, as those are good sources)
- We need to convert all the online sources to book sources if possible. I saw some sources using the documentation for the standard library and preferably we should use books instead.
- After those issues, we're mostly good to go after a thorough read of the FA criteria, going over all sources in the article and seeing if they actually supported the claim, and reading the article to check its prose.
To people watching this page: Please consider helping out! I'm a bit busy, but if more people contribute it will nudge me to contribute more as well. 0xDeadbeef→∞ (talk to me) 13:40, 7 February 2024 (UTC)
- For the comment on lifetimes, I have added some examples that should help illustrate it further. There is another gap between talking about lifetimes in generic definitions and to the example with reading configurations, which could use smaller examples to build the knowledge better. 0xDeadbeef→∞ (talk to me) 15:12, 22 March 2024 (UTC)
Cut OS content
editSquizzler (talk · contribs) made some improvements to the OS adoption section (adding r9 and Fuschia) and also removed the following content. I don't mind using the more abridged text as the article is quite long, but posting here in case there are other opinions.
For Linux:
Support for Rust (along with support for C and Assembly language) was officially added in version 6.1.[1]
And for Windows:
As of 2023[update], DWriteCore, a system library for text layout and glyph render, has about 152,000 lines of Rust code and about 96,000 lines of C++ code, and saw a performance increase of 5 to 15 percent in some cases.[2]
Thanks! Caleb Stanford (talk) 16:01, 10 March 2024 (UTC)
References
- ^ "A first look at Rust in the 6.1 kernel [LWN.net]". lwn.net. Retrieved 2023-11-11.
- ^ Claburn, Thomas (2023-04-27). "Microsoft is rewriting core Windows libraries in Rust". The Register. Retrieved 2023-05-13.
- For Linux, there is a dedicated article Rust for Linux, so only a brief summary is needed here. Android inclusion of Rust is also part of the "Rust for Linux" project.
- IMO the use of Rust in Windows is an aspect that should be included in detail here until there is separate article for it. Microsoft is a founding member of the Rust Foundation, but the specifics of the use of Rust in their OS isn't as well known due to the source not being public. Dates are especially important.
- I feel the "Adoption" section should be more like a timeline of significant events of Rust being used in significant products / end-user software, and less emphasis on software that havent gained traction yet, e.g. Redox / Fuchsia / COSMIC. etc (apologies to anyone using those at home). John Vandenberg (chat) 00:59, 3 September 2024 (UTC)
Controversy Section
edit@BOBROBMEBOYO: I reverted your edit because it's uncited and felt too brief. I think it's worth mentioning somewhere though. It should be made clear it's about the trademark policy and not Rust's source code license. I feel it should also touch on later events, like the foundation soliciting feedback and updating the policy, and it should include some dates. It might also make sense to put it under the Rust Foundation section. Maybe other editors can chime in. JamenMarz (talk) 06:23, 26 March 2024 (UTC)
- It is already in the article, as the last paragraph of the "History" section. Betseg (talk) 11:47, 26 March 2024 (UTC)
Can someone write a Comparison of Rust and C article?
editComparable to the article Comparison of Pascal and C which could be used as an example. I know there is this comparison article for almost every language, but this all languages article is not the same as it only consists of tables and not actual code comparisons like the Pascal vs. C article. 84.140.194.104 (talk) 21:47, 5 April 2024 (UTC)
- Hmm. These comparison type articles look like they might violate WP:NOT/WP:NOTHOWTO and WP:OR. Nominating them for deletion would have a chance of succeeding. Not sure they are a good fit for the encyclopedia. Anyway, for that reason, I'm not sure new comparison articles such as Comparison of Rust and C will be written. –Novem Linguae (talk) 22:23, 5 April 2024 (UTC)
- I just read the article and it was a great read. It's definitely not a HOWTO or OR. I don't know if NOT applies and why it should, but it would definitely be a great loss if the article were to be removed. It could be substantiated by citing some programming books, but other than that there's nothing to complain about. 84.140.194.104 (talk) 08:01, 6 April 2024 (UTC)
- I don't see any benefit in comparing C and Rust. Rust vs C++ is a more common comparison, so would be more valuable and easier to find reliable sources for. Also C++ is evolving at a more similar pace to Rust, with similar objectives in the evolution process. In contrast, while the C standard is being improved, the scope of the evolution is more constrained, and adoption of new editions of C is much slower as C is more often used for its compatibility & stability. John Vandenberg (chat) 00:33, 4 September 2024 (UTC)
@LOLHWAT: I'm not getting what you mean by "intro section seems written by a rust contributor to an outside person". As per MOS:LEAD, the lead paragraph of an article provides an overview of the subject, and in this case it provides an overview of the language while highlighting the most significant features (enforcement of memory safety through lifetimes, rapid adoption, etc).
What part of that is non-neutral, in your opinion? 0xDeadbeef→∞ (talk to me) 12:17, 23 April 2024 (UTC)
- "Rust is a multi-paradigm, general-purpose programming language that emphasizes performance, type safety, and concurrency. It enforces memory safety—meaning that all references point to valid memory—without a garbage collector. To simultaneously enforce memory safety and prevent data races, its "borrow checker" tracks the object lifetime of all references in a program during compilation. Rust was influenced by ideas from functional programming, including immutability, higher-order functions, and algebraic data types. It is popular for systems programming." The lead section seems to describe rust as a programming language from the perspective of a contributor, and uses words that emphasize its so-called "goodness". There seems to be little mention of its shortcomings. LOLHWAT (talk) 13:13, 23 April 2024 (UTC)
- @LOLHWAT: When you describe a programming language, you describe its features. I feel like this is quite a biased take. You don't find Wikipedia covering shortcomings of a programming language right at the lead section (with C++ having a criticism section and Python a mention in a sentence for bloatedness), because it isn't a significant feature of the thing. Unless there is significant coverage of how bad something is, we don't say it is bad. For example, we only can call Phrenology a pseudoscience because nearly all sources describe it that way.
- I'm happy to put any criticism of Rust in a section if you could help us find some reliable sources that talk about it. But asking for criticism of a programming language up front, when most sources that discuss the language don't present significant criticism of the language, is just creating WP:FALSEBALANCE. I'm going to revert your addition of the tag, because the justification given here seems insufficient. 0xDeadbeef→∞ (talk to me) 13:40, 23 April 2024 (UTC)
Ideas on restructuring this for FA standards
editI have some notes on restructuring the parts that provide an overview of the programming language itself, which I'm planning to implement after this comment. However, I noticed two problems in the article:
- The history section, especially for before Rust 1.0, uses some quite poor sources, with archives from the mailing list for the changelogs, and an interview on Graydon Hoare by InfoQ. I think they should be rewritten to use better sources. Some of the details, like when Rust bootstraped itself or when destructors are added, aren't really needed in an encyclopedia article, so probably trim it down. The MIT Technology Review article already provides a good overview, we could just rely on that one only for the pre-1.0 history.
- The adoption section runs into WP:DUE concerns: What made us cover Cloudflare's own blog about them using Rust and not FooCompany's software blog about using Rust? I think we need to significantly trim it down such that only adoptions covered by third party sources (e.g. Ars Technica, ZDNet, etc.) are in the article.
0xDeadbeef→∞ (talk to me) 15:05, 7 July 2024 (UTC)
- Sounds good to me. If you want some help identifying better sources, let me know, or maybe list out any other sources that we need to replace. Only thing I probably disagree with is the "when Rust bootstraped itself" date (assuming we can find a better source), that's a rather important event from the perspective of compiler design. Caleb Stanford (talk) 19:09, 7 July 2024 (UTC)
- Any help with identifying better sources would be awesome! I don't mind putting the date of Rust building itself as a milestone if there is a good source that mentions it, I'd just assume it isn't lost for an encyclopedia article if there wasn't and we have to remove it (we're writing for a general audience here, after all) 0xDeadbeef→∞ (talk to me) 02:59, 9 July 2024 (UTC)
More action items
editThese are some notes I took when I went over the article last time. Please feel free to take them and contribute!
- It doesn't help a lot with the types organized into tables. Rewriting them into prose or lists might help readers understand different types better with more explanations attached to each type, and also we could integrate different types that provide different functionalities better.
- The pointers section should distinguish pointers that are built-in to the language and pointers that are provided by the standard library if possible.
- The section on memory management could be merged to the pointers section as a general discussion of how Rust does memory.
- There are parts of discussion on iterators that could be under a general "functional programming features" section, talking about the various methods on iterators.
- Same for closures, that could also get merged into a section on functional programming.
- Variadic macros should not be its own section; it should be merged into other sections on macros as a relatively short note.