A Rust datetime library has been on my to-do list for a long time. :)
JSR-310 is a very complete solution, but it carries a lot of Java
baggage. C++11's std::chrono library [1] defines a smaller API for time
points and durations without calendars (i.e. the hard part).
std::chrono's API might
The following code snippet does not emit any compilation warnings about
redeclaring variable names or types:
fn x(y: int) - ~str {
let y = y + 1;
let x = y == 2;
let x = x.to_str();
x
}
Is this a feature or a bug? The Rust manual has no comment. This
After reading the recent discussions about lifetime notation, I was
wondering why lifetimes need their own names. Lifetimes refer to
variables that already have names. For example, given this fn from the
borrowed pointers tutorial:
fn selectT(shape: Shape, threshold: float,
strcat and I have been casually brainstorming about container traits.
Has there been previous discussion about standardizing a container trait
hierarchy and method naming convention?
Below is a rough sketch of a simple container framework, inspired by
Scala, Python, and C++ STL. Scala has a
On 2/1/13 11:24 AM, Graydon Hoare wrote:
- I think the double-ended circular vec struct (implemented unsafely)
should probably be called Buf. It's the replacement for DVec.
Alternatively call it Queue and come up with another name for the
can access at either end trait. Deque
On 2/1/13 11:48 AM, Erick Tryzelaar wrote:
FYI, I'm in the process of converting fun_treemap into an AA Tree and
implement much of the container traits. In the process, I've extracted
out the mutation functions from Map and Set into their own
Mutable{Map,Set} trait, and added
On 3/19/12 7:22 PM, Graydon Hoare wrote:
Beyond this, I think the widening rules or any form of in-expression
promotion in general is too hazardous. Literals are the pain point.
Sounds good. Safely promoting literals would be a big help.
chris
___