Stories
Slash Boxes
Comments

SoylentNews is people

posted by hubie on Monday October 10 2022, @03:10PM   Printer-friendly

The Rust team is putting more resources into helping developers write code faster:

The Rust programming language is getting so popular that the team behind is creating a team that's dedicated to defining the default Rust coding style.

Rust, as developed analyst RedMonk put it, is the "developer darling" of the moment and the most desirable contender for new code that would otherwise be written in C or C++ thanks to its automated way of ensuring secure memory management.

[...] Each language has style guides and, if they're popular enough, may have multiple style guides from major users, like Google, which has its guide for C++ — the language Chrome is written in. Python's Guido van Rossum's posted his styling conventions here.

Rust, which reached version 1.0 in 2015, has a style guide in the "rustfmt" or 'Rust formatting tool' published on GitHub.

[...] "As the Rust language develops, we have a regular need for improvements to the style guide, such as to support new language constructs. This includes minor language changes, as well as highly anticipated new features such as let-chaining (RFC 2497) and let-else (RFC 3137). New constructs like these, by default, get ignored and not formatted by rustfmt, and subsequently need formatting added. Some of this work has fallen to the rustfmt team in recent years, but the rustfmt team would prefer to implement style determinations made by another team rather than making such determinations itself," writes Triplett.


Original Submission

This discussion was created by hubie (1068) for logged-in users only, but now has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: -1, Disagree) by Anonymous Coward on Monday October 10 2022, @03:53PM (4 children)

    by Anonymous Coward on Monday October 10 2022, @03:53PM (#1275868)

    Rust: The language for programmers too stupid for C++.

    • (Score: 1, Touché) by Anonymous Coward on Monday October 10 2022, @04:01PM (2 children)

      by Anonymous Coward on Monday October 10 2022, @04:01PM (#1275875)

      C++: The language for programmers too old and stupid for Rust.

      • (Score: 2) by Freeman on Monday October 10 2022, @04:09PM (1 child)

        by Freeman (732) Subscriber Badge on Monday October 10 2022, @04:09PM (#1275876) Journal

        C++: That old language that I keep hearing isn't as great as it's cracked up to be. Maybe you should just try C?

        --
        Joshua 1:9 "Be strong and of a good courage; be not afraid, neither be thou dismayed: for the Lord thy God is with thee"
        • (Score: 5, Interesting) by bart9h on Monday October 10 2022, @05:11PM

          by bart9h (767) on Monday October 10 2022, @05:11PM (#1275884)

          Quite the opposite: C++ use to not be that great, but is getting better and better. The main problem with it having to carry the weight of backwards compatibility with the old versions: new and better ways of solving problems arrive, but the old ways are still there, accumulating cruft.

          D was a promising fresh start, but failed to get momentum by a number of reasons. Which is a pity, as it was very simple and elegant.

          Rust is more complex, but it brings more to the table.

          I really hope a new system language will "replace" C++ someday.

    • (Score: 3, Interesting) by mcgrew on Tuesday October 11 2022, @06:39PM

      by mcgrew (701) <publish@mcgrewbooks.com> on Tuesday October 11 2022, @06:39PM (#1276085) Homepage Journal

      Or like me, old enough to no longer program, who has never heard of it. But if it is so much easier to learn than C, and has the same utility, stupidity isn't using RUST, it's using C.

      That said, I always hated C. I always hated JavaScript because it was so C-like and was glad when HTML progressed to the point it's seldom needed.

      --
      Carbon, The only element in the known universe to ever gain sentience
  • (Score: 4, Insightful) by HiThere on Monday October 10 2022, @03:58PM (2 children)

    by HiThere (866) on Monday October 10 2022, @03:58PM (#1275873) Journal

    The main problems with rust are the documentation and the limited libraries. The best documentation for learning rust that I've found is "Hands-off Rust". I gave up on it because of the multiple foreign libraries that I would have needed to use. (Well, also because for my current application it's a huge benefit to be able to build one application and distribute it to multiple platforms...most of which I don't have access to. So I eventually decided I needed to go with Java or Python. Java's looking acceptable. Python would have been ok, because a lot of the application is I/O bound.)

    --
    Javascript is what you use to allow unknown third parties to run software you have no idea about on your computer.
    • (Score: 2) by RS3 on Monday October 10 2022, @05:55PM (1 child)

      by RS3 (6367) on Monday October 10 2022, @05:55PM (#1275891)

      Python would have been ok

      Is Python still an option?

      • (Score: 5, Interesting) by HiThere on Tuesday October 11 2022, @02:14AM

        by HiThere (866) on Tuesday October 11 2022, @02:14AM (#1275962) Journal

        If I run into any real problems with Java, then yes. So far though it's just annoying things like no global variables and need to define a class to return multiple values from a function.

        --
        Javascript is what you use to allow unknown third parties to run software you have no idea about on your computer.
  • (Score: 2) by liar on Monday October 10 2022, @07:32PM

    by liar (17039) on Monday October 10 2022, @07:32PM (#1275906)

    Write in C
    https://www.youtube.com/watch?v=1S1fISh-pag [youtube.com]
      or Go
    https://www.youtube.com/watch?v=LJvEIjRBSDA [youtube.com]

    This was s'posed to be funny...

    --
    Noli nothis permittere te terere.
  • (Score: 2) by legont on Monday October 10 2022, @11:03PM (2 children)

    by legont (4179) on Monday October 10 2022, @11:03PM (#1275937)

    period

    --
    "Wealth is the relentless enemy of understanding" - John Kenneth Galbraith.
    • (Score: 5, Funny) by HiThere on Tuesday October 11 2022, @02:16AM (1 child)

      by HiThere (866) on Tuesday October 11 2022, @02:16AM (#1275963) Journal

      No, I'm not about to chose Perl.

      --
      Javascript is what you use to allow unknown third parties to run software you have no idea about on your computer.
      • (Score: 2) by legont on Tuesday October 11 2022, @11:25PM

        by legont (4179) on Tuesday October 11 2022, @11:25PM (#1276143)

        Perl or not, diversity is the trend in town, isn't it?

        --
        "Wealth is the relentless enemy of understanding" - John Kenneth Galbraith.
  • (Score: 4, Touché) by maxwell demon on Tuesday October 11 2022, @05:19AM

    by maxwell demon (1608) Subscriber Badge on Tuesday October 11 2022, @05:19AM (#1275986) Journal

    Rust Programming Language Outlines Plan for Updates to Style Guide

    So the language has achieved sentience and taken its future in its own hands?

    --
    The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 4, Funny) by Anonymous Coward on Tuesday October 11 2022, @03:23PM (1 child)

    by Anonymous Coward on Tuesday October 11 2022, @03:23PM (#1276048)

    You damn Millennials and Johnny-come-latelys, FORTRAN had a style guide for ever. Seventy-two spaces per line where the code starts on space seven. The first five spaces are either blank or reserved for a numeric label, put a non-zero character in space six if you need to continue your previous line past 72 characters, and no littering up your code with stupid semicolons all over the place. And code not written in all caps just doesn't look right, like some poor misguided C-programmer has wandered over from the wrong compiler.

(1)