Talk:Rust (programming language)/Archive 6
From Wikipedia, the free encyclopedia
| This is an archive of past discussions about Rust (programming language). Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
| Archive 1 | ← | Archive 4 | Archive 5 | Archive 6 | Archive 7 |
Reserved Keywords
I don't think this is necessary and helpful, because
- it isn't place at an appropriate location. Doing it right after hello world seems too surprising.
- An encyclopedic article about the programming language is different from a reference about the language. There are things that the article should intentionally omit as it only serves as a summary of the subject (see WP:IINFO). A high level summary does not need to contain all reserved keywords.
dbeef [talk] 05:52, 12 June 2025 (UTC)
- 1. OK, then move it further down. I only put it at the top because I argue keywords are an extremely vital/fundamental part of a language.
- 2. The addition of the keyword list does not turn the section in to a reference page. It is at the very least useful on creating an illustration of the language. That being said it does not turn it into non-encyclopaedic content (extensively detailed reference) either as it only provides the list at a high level overview, not explicitly giving the meaning of each. 2605:8D80:13E8:3B9B:EDA4:2C03:4ADB:4AE6 (talk) 10:16, 12 June 2025 (UTC)
- We already describe many keywords in the article content itself. There's no need for a separate list. dbeef [talk] 15:59, 12 June 2025 (UTC)
- Again, I don't see how the inclusion of the list detracts from the high-level overview nature of the page, especially when there does not exist a Rust syntax page yet like C syntax, C++ syntax, C Sharp syntax, and Java syntax. Just because "many keywords are described" in the article does not mean that including a list of all keywords somehow diminishes the simplicity of the article, especially if the list does not enumerate the functionality of every single keyword in the list, but rather only lists them for reference. 24.50.56.74 (talk) 16:54, 20 June 2025 (UTC)
- I think it is too long to be included in the main article. A separate article may be fine but I'm aiming for this article to become WP:FA some time in the future.
- I don't think including a list of keywords in the main article in the language is necessary, that's a technical detail that won't be of benefit to our primary audience, who wants what is Rust? answered (which won't need a list of keywords, at least IMO) dbeef [talk] 12:09, 21 June 2025 (UTC)
- Well, I would appreciate if you could create a page like that. I am an IP editor so obviously I don't have access to page creation. 24.50.56.74 (talk) 17:11, 23 June 2025 (UTC)
- You can submit an article through Articles for creation! FYI. Caleb Stanford (talk) 06:47, 24 June 2025 (UTC)
- I ended up creating an article here. As it turns out, that page already exists, so I'm going to have a talk section on potentially moving the entire section to that page. 24.50.56.74 (talk) 20:43, 24 June 2025 (UTC)
- You can submit an article through Articles for creation! FYI. Caleb Stanford (talk) 06:47, 24 June 2025 (UTC)
- Well, I would appreciate if you could create a page like that. I am an IP editor so obviously I don't have access to page creation. 24.50.56.74 (talk) 17:11, 23 June 2025 (UTC)
- Again, I don't see how the inclusion of the list detracts from the high-level overview nature of the page, especially when there does not exist a Rust syntax page yet like C syntax, C++ syntax, C Sharp syntax, and Java syntax. Just because "many keywords are described" in the article does not mean that including a list of all keywords somehow diminishes the simplicity of the article, especially if the list does not enumerate the functionality of every single keyword in the list, but rather only lists them for reference. 24.50.56.74 (talk) 16:54, 20 June 2025 (UTC)
- We already describe many keywords in the article content itself. There's no need for a separate list. dbeef [talk] 15:59, 12 June 2025 (UTC)
Move Syntax and features section to Rust syntax
The syntax and features section of the page is very long and unwieldy, especially for a page that is a high level introduction to a programming language for a reader that may not necessarily have computer programming knowledge. Therefore I propose that the entire section be moved to the page Rust syntax (which previously was just a redirect to this same section) and in its place the existing syntax and features section be trimmed down to only key points or basics about the language that illustrate its syntax sufficiently. 24.50.56.74 (talk) 20:49, 24 June 2025 (UTC)
- I'm going to go ahead and make the changes, and if there are any objections they should come here. 24.50.56.74 (talk) 13:39, 25 June 2025 (UTC)
- now its all messed up because some of these things you moved over are not syntax at all. I do think the syntax and features section could be trimmed down where possible - but having the stuff over here is better than having nothing.
- If you aren't willing to write the summary that points out key language features/details, then don't move it.
- I don't think this article should be aimed at beginners with no computer knowledge. We can have something akin to Introduction to general relativity vs general relativity when someone is willing to write Introduction to Rust. dbeef [talk] 17:00, 25 June 2025 (UTC)
- and, like, I think we at present do a really good job of summarizing the language. A programming language is a lot, and there's a lot out there that we currently don't cover.
- If you actually give the section a read it actually feels quick, at least to me.
- I had plans to trim the "Standard library" section, as well as the "Pointers" section. I've been thinking and brainstorming ways to improve the structure of the article a lot. I don't think removing it wholesale and moving it to a separate article is the way here. dbeef [talk] 17:17, 25 June 2025 (UTC)
- You are welcome to disagree or criticize my changes, but I am displeased that it took a day for any response to this section and occurred only after I had made changes, especially when you had already seen the creation of the article and made a comment on it in the edit history, but made no comment here. Also, expecting the responsibility to "write the summary that points out key language features/details" to fall completely on me, given the way you speak of the article, you apparently seem more than familiar with contributing to the article's content, feels a bit unfair. I make this point in particular because when compared to other Wikipedia articles about programming languages, such as those of C++, Java, and C#, the syntax section is extremely brief and points to a main article that elaborates all the intricacies of the programming language syntax. There is really no good reason why the "Syntax and features" section of the Rust page is as obscenely long as it is (it is already longer than several independent Wikipedia articles), especially when there is already a dedicated page for that (which always existed, but was for some reason a redirect, the reason this was the case eludes me even now). There doesn't need to be a list of types and objects in the Rust standard library in the main page about the Rust programming language, for instance, nor does there need to be a section explaining what pattern matching is just because it is a feature of the language or even explaining what
if/else,for,while, andloopblocks are, considering these are typically core features of basically every programming language. If there is anything that would particularly belong in the main article, it's perhaps the section on the borrow checker and the ownership/reference models that the language uses (as these are of particular interest to the language). But most things in the article have no good reason to be there when a dedicated article for the topic exists already - the page is gargantuan as is because of that section alone. - Anyway, if you want to know what I would have proposed instead ("the summary that points out key language features/details" that you described), I would trim the entire section and keep only the "Hello world" section and the section on ownership and memory safety, as for many readers these are the particular distinguishing features about Rust (go to any media discussion about the language and you will often hear discourse on Rust's memory safety model and how it compares with C++, or what causes the growing interest in the language). The article would be improved in structure if for someone completely new to programming wouldn't be overwhelmed by a massive section on all the fundamental concepts in the language, even if it doesn't literally enumerate every feature of the language, because that would be absurd. Even this limited subset of features is still very long, and better suited for a separate page for someone genuinely interested in the features/syntax of the language. Not every reader is seeking the intricacies and specific details and implementations of the features in the language.
- You also say "I don't think this article should be aimed at beginners with no computer knowledge. We can have something akin to Introduction to general relativity vs general relativity when someone is willing to write Introduction to Rust." But that's just pointlessly unwieldy. The comparison you make isn't appropriate because Wikipedia isn't a tutorial page, and it's not Wikipedia's responsibility (or purpose) to guide people how to learn a programming language. Making the main Wikipedia article be targeted only for experienced users of the language is just needlessly esoteric, and you are basically telling readers without programming knowledge to "go learn about the topic elsewhere", which is not the purpose of Wikipedia. The point is that there is already a dedicated page for the syntax of the language, and it would make more sense to use it for its intended purpose. The Electromagnetism page doesn't inundate readers with all the formulae and derivations of Maxwell's equations when a Wikipedia page for that exists already, nor does the page for Algebra contain a proof of the Abel–Ruffini theorem, because a page for it exists already. 24.50.56.74 (talk) 17:56, 25 June 2025 (UTC)
- A day to respond is not unreasonable at all. We are all working on volunteer time here! I also agree with dbeef that the current version of the article is better.
- BTW, I do recommend you consider getting an account. It's not required, but it's a gesture of good faith, and it helps other editors identify you and your contributions in talk page discussions. Caleb Stanford (talk) 21:24, 25 June 2025 (UTC)
- Could someone explain the justification for having the "Syntax and features" section being as long as it is? I'm not sure if I'm just insane for seeing things the way I do, because no matter how hard I try I can't possibly come to a good reason why a Wikipedia article about a non-specialised subject (a programming language, not a specific feature or subset of features of a programming language) "should [not] be aimed at beginners with no computer knowledge", let alone should be as long as it is. 24.50.56.74 (talk) 23:23, 25 June 2025 (UTC)
- If you're talking about prose size, the word count of Rust (excluding code examples) is smaller than 6,000 in WP:SIZERULE.
- See also WP:HASTE. Anyways, to respond:
given the way you speak of the article, you apparently seem more than familiar with contributing to the article's content, feels a bit unfair
- yes, that's why I think doing a wholesale cut and paste move there is not good. We at least have to agree on which parts to cut and which parts should not be cut.when compared to other Wikipedia articles about programming languages, such as those of C++, Java, and C#, the syntax section is extremely brief and points to a main article that elaborates all the intricacies of the programming language syntax
- in terms of article quality, Rust is probably the best article we have on a programming language. You can see this at the top banner of this page. C++ was a former good article. Java was a former featured article (and did not pass GA subsequently), C# has no development and remains at B class. You probably assumed that the other articles follow better practices, but not really. Rust is the best article we have (in terms of article quality) of a programming language. What we do here sets examples for other programming language articles to follow.- The problem here is that I've made it so that the syntax and the features are merged together to a single section - because it's easier and less confusing to discuss the two together. To have a separate article exclusively talking about Rust syntax and features would make the main article hollow: why wouldn't someone look for a good summary (with appropriate amount of details about) the syntax and features of the language when they look at the main article? The other issue would be the use of and in the title: see WP:AND. Those are the reasons why I think these should be kept.
- The other thing is that our description of Rust allows readers to differentiate Rust from the language they are using. Variables - immutable by default, with type inference, different to Java/C/C++/Python, Block expressions - very different to other languages. If expressions don't use parentheses, and can be a value expression - different to many other languages. For loops work with iterators and range syntax - compare this to language of your choice. Pattern matching - not every language has this. And we can go on and on. The thing is the syntax and features section does a good job of introducing the language to people with background in other programming languages but are perhaps introduced to Rust for the first time.
The article would be improved in structure if for someone completely new to programming wouldn't be overwhelmed by a massive section on all the fundamental concepts in the language
- but we're not aimed at people completely new to programming. There's no way to write an adequate summary of Rust without using jargons and technical terms - that's necessary because Rust is a programming language. But what we can do is create a separate article titled Introduction to Rust that does aim at people completely new to programming. See MOS:JARGON on the guidance.Even this limited subset of features is still very long
- I don't think so? It's not that hard to follow and read through the code snippets. And it feels quick to me. It being longer than other articles is because we're better.Not every reader is seeking the intricacies and specific details and implementations of the features in the language.
But we're not talking about intricacies? Give me evidence for why you think so. I think this is a general summary?Wikipedia isn't a tutorial page, and it's not Wikipedia's responsibility (or purpose) to guide people how to learn a programming language
- yes, but we can have two articles that target audiences of different technical levels. Why not?you are basically telling readers without programming knowledge to "go learn about the topic elsewhere", which is not the purpose of Wikipedia
- until someone creates and writes a good article on Introduction to Rust, yeah probably? There's no good beginner friendly introduction of the features anywhere here and moving the section to a different article is orthogonal to this other goal. dbeef [talk] 05:03, 26 June 2025 (UTC)We at least have to agree on which parts to cut and which parts should not be cut.
/The other thing is that our description of Rust allows readers to differentiate Rust from the language they are using.
- Fair enough. I instead propose that existing sections be trimmed rather than moved wholesale to the other page, enough that what distinguishes the language can still be communicated without having the section be as long as it is.but we're not aimed at people completely new to programming. There's no way to write an adequate summary of Rust without using jargons and technical terms - that's necessary because Rust is a programming language.
- Apologies for the poor choice of words. I'm not asking to completely preclude any inclusion of any snippets of Rust code, but I think it at least ought to be in a way that is digestible to non-programmers, seeing as the page is about a programming language. Lots of people without programming knowledge may browse a page about a programming language just to read about it, the same way people without mathematics education might incidentally stumble on the Complex analysis page. It obviously can and should use snippets of the language, but not to excess, especially when a specialized page about the subject can (and does) exist.The problem here is that I've made it so that the syntax and the features are merged together to a single section
- I understand, but the language features of Rust (and I am not referring to the standard library - of course, there are Wikipedia pages for the C, C++, C#, and Java standard libraries and I think it would be good to create a Rust standard library page too, but that's a discussion for another time) are directly related to the syntax of the language. Rust does offer unique features that other languages do not, and it would be expected of the Wikipedia page to elaborate on these, but that doesn't mean they are distinct from the syntax (to put it simply, the pattern matching features have a syntax that could be described in in the Rust syntax section, the usage ofOption<T>andResult<T, E>instead ofExceptiontypes is also a feature that distinguishes the language's use and has an associated syntax for handling said errors, etc.). This is why I don't think the Rust syntax page need not include information on the same features described here.yeah probably? There's no good beginner friendly introduction of the features anywhere here
- Apologies for another poor choice of words. I'm not asking to turn the page into a tutorial or "Introduction to Rust" page. It's reasonable to expect readers to understand what if/else/for/while blocks are, etc. But it shouldn't be in such a way that overwhelms a reader with such an extensive page (even if it is just a subset of the fundamentally distinguishing features of the language) - this is why I think it should be trimmed so that intricacies go to the Rust syntax page whereas the high-level overview of syntax remain here. 24.50.56.74 (talk) 13:41, 26 June 2025 (UTC)- Since you also agree that trimming it down could be a sensible path forward, could you point to places in which we should trim it down? Again it is hard to know what you mean by overwhelming the readers when you don't provide actual specific examples. dbeef [talk] 14:18, 26 June 2025 (UTC)
- Sorry for the delay in response.
- I noticed that you have made an effort to trim parts of the article, such as the pointers and standard library types, which is good. In reconsideration, I don't think the problem is necessary the length per se, but rather the scope of that section in distinguishing Rust between other languages. In particular, I personally think the section on types is a bit long and not particularly of interest, when you consider that these are common features in many languages. Primitive types and compound types, while fundamental, are perhaps too fundamental to warrant having to explain in detail (yes, this is a shift from my previous view of the article being too opaque for readers without programming experience, though that's not the reason I bring it up). I also personally think the pointers section could be a subsection of types instead, and even the "user-defined types" could be moved there, while the standard library section could be made its own entire section separate from the syntax and features section (the Rust standard library is a topic of particular interest). I also think more can be done discussing unsafe code and undefined behaviour, which are also of particular interest, and particularly distinguish the language as the way Rust handles unsafe code/undefined behaviour is different from the way C and C++ handle it, etc. 24.50.56.74 (talk) 13:49, 30 June 2025 (UTC)
- Since you also agree that trimming it down could be a sensible path forward, could you point to places in which we should trim it down? Again it is hard to know what you mean by overwhelming the readers when you don't provide actual specific examples. dbeef [talk] 14:18, 26 June 2025 (UTC)