Slashdot Mirror


Rust 1.32.0 Stable Release Includes New Debugging Macro, 'Quality of Life' Improvements (rust-lang.org)

An anonymous reader summarizes the changes in Thursday's release of Rust 1.32.0 stable: "Quality of life" improvements include a new dbg macro to easily print values for debugging without having to use a println statement. For example, dbg!(x); prints the filename and line number, as well as the variable's name and value, to stderr (rather than to standard output). Making it even more useful, the macro also returns the value of what it's debugging -- even all the boolean values returned by each execution of an if-then statement.

Rust macros can now match literals of any type (string, numeric, char) -- and the 2018 edition of Rust also allows ? for matching zero or one repetitions of a pattern.

In addition, all integral numeric primitives now provide conversion functions to and from byte-arrays with specified endianness.

1 of 96 comments (clear)

  1. Re:Quality of life by Anonymous Coward · · Score: 0, Funny

    Is there anything you old faggots have to whine about besides SJW, or is that like the epitome of your toothless ideological rage?

    <SIR_DAVID_ATTENBOROUGH_VOICE>

    Here we see the hypocritical hatred of the SJW making its appearance.

    This time, it's homophobic hate. But next time, it may very well be racist hatred.

    When we observe the SJW in its natural habitat, we often see it display a tremendous blind spot as it acts out in the very ways it says are wrong. For example, we often observe SJWs calling others, "Raaaacis'!!!" while at the same time it virtue signals to the rest of its troop of semi-intelligent primate-wannabes by demanding racial quotas.

    It's somewhat like a blind peacock, showing off its feathers to other peacocks - and walking off a cliff to its death.

    Or, as in this case, we see a SJW calling someone the homophobic slur "faggot".

    </SIR_DAVID_ATTENBOROUGH_VOICE>