News for hackers. Stuff that matters.
Re:Rust, Macros, λ-calculus/Church numerals, oh my by orbital-decay on Saturday June 08, 2019 @02:41AM (#20130997)
>Here's a random selection: https://github.com/mockingbirdnest/Principia/blob/master/phy...

I don't think r² as a variable name is a good idea. It may look natural for some (including myself), but for others it implies a function while not being one.

Re:Rust, Macros, λ-calculus/Church numerals, oh my by nixpulvis on Saturday June 08, 2019 @10:56AM (#20132695)
Interesting... r² could be viewed as both an identifier and an operation.

    r² = r^2;
    A = πr²
Re:Rust, Macros, λ-calculus/Church numerals, oh my by db48x on Saturday June 08, 2019 @03:06PM (#20134380)
Yea, that's fair; it's definitely one of the more surprising things that they do. On the other hand, it's pretty common to pass around squared values that the math says that you ought to have taken the root of, when you know how long it takes to do that root. You're going to end up with some kind of convention for it, so it might as well be a short one.
Re:Rust, Macros, λ-calculus/Church numerals, oh my by fluffything on Saturday June 08, 2019 @07:23AM (#20131831)
I don't see how r² is worse than r2 or r_2 or r_to_the_power_of_two..