Talk:Carbon (programming language): Difference between revisions

Content deleted Content added
Ybab321 (talk | contribs)
re
 
(6 intermediate revisions by 3 users not shown)
Line 37:
:::Now as a contrary point, I have looked at various programming language articles on Wikipedia and generally they don't do language comparisons, merely language examples. But cc @[[User:Nexxl|Nexxl]] who added the comparison. [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 00:03, 24 February 2024 (UTC)
:::: Perhaps I spoke too brazenly, my apologies. It is true that a lot of C++ code is written that is, lets say, suboptimally portable (an implementation is ''allowed'' to declare {{tt|M_PI}} in a header, it's just not a standard requirement. It's also true that the vast majority of C++ code in the wild currently won't be using the C++20 and C++23 features that would make the comparison as direct as I would like it to be. I certainly don't mean to imply that the carbon folk are selling a maliciously self serving example, though it seems a bit silly to me to compare new carbon code with old C++ code. When comparing new carbon code with new C++ code, one can see that the differences are purely syntactic, which I think is a great and meaningful result of comparison between programming languages. With all that said, I'm amenable to restoring the comparison as it was, but obviously my preference remains otherwise. --[[User:Ybab321|Ybab321]] ([[User talk:Ybab321|talk]]) 22:54, 27 February 2024 (UTC)
:::::Now that I think about it, the best solution would be to update the C++ code in the Carbon repo with your code. Then Wikipedia can cite it and also you will be happy. So I would say, open a PR and see what happens. At least that way there will be an official response / nonresponse. [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 18:16, 28 February 2024 (UTC)
Attempting the best solution sounds like a good idea to me, [https://github.com/carbon-language/carbon-lang/pull/3735 opened a PR] as suggested --[[User:Ybab321|Ybab321]] ([[User talk:Ybab321|talk]]) 21:24, 29 February 2024 (UTC)
: OK my PR has been merged now. I'm still OK with the C++ code not being there per the "generally they don't do language comparisons" observation, though Carbon's relationship with C++ is a special one. I'm not really sure what makes the most sense, but I'll add the code comparison back in seeing as we went down this route --[[User:Ybab321|Ybab321]] ([[User talk:Ybab321|talk]]) 23:55, 4 March 2024 (UTC)
::I would say at present, the article's biggest issue is the lack of material. There are just not many sources. But the code comparison at least makes it not look like a stub. I would say it's fine for now. [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 03:57, 5 March 2024 (UTC)
 
== Formatting ==
 
Would there be any merit to adding newlines to the code blocks in [[Carbon#Example|§Example]] to align similar bits of the two blocks side-by-side? [[User:Arkadios 200|Arkadios 200]] ([[User talk:Arkadios 200|talk]]) 10:04, 2 March 2025 (UTC)
 
:There is an issue with line wrapping on smaller screens. I think a newline or two might help, but you would have to be careful to check that it looks good at all window widths. [[User:Mathnerd314159|Mathnerd314159]] ([[User talk:Mathnerd314159|talk]]) 00:07, 6 March 2025 (UTC)