1
Fork 0
Empowering everyone to build reliable and efficient software. Gabriel's commits. https://www.rust-lang.org/
Find a file
Ben Striegel d162fa26ba A new times method on numeric types
This method is intended to elegantly subsume two common iteration functions.
The first is `iter::range`, which is used identically to the method introduced
in this commit, but currently works only on uints. The second is a common case
of `{int, i8, uint, etc.}::range`, in the case where the inductive variable is
ignored. Compare the usage of the three:
```
for iter::range(100u) {
    // do whatever
}

for int::range(0, 100) |_i| {
    // do whatever
}

for 100.times {
    // do whatever
}
```
I feel that the latter reads much more nicely than the first two approaches,
and unlike the first two the new method allows the user to ignore the specific
type of the number (ineed, if we're throwing away the inductive variable, who
cares what type it is?). A minor benefit is that this new method will be
somewhat familiar to users of Ruby, from which we borrow the name "times".
2012-07-05 19:44:20 -07:00
doc Minor tutorial tweaks 2012-07-05 11:32:49 -07:00
man Mark -g as experimental (#2767) 2012-07-02 17:22:49 -07:00
mk Switch back to USE_SNAPSHOT_CORELIB=0. 2012-06-29 15:34:39 -07:00
src A new times method on numeric types 2012-07-05 19:44:20 -07:00
.gitignore Make git ignore the .DS_Store file on Macs (wherever it is) 2012-06-12 17:37:04 -07:00
.gitmodules Update libuv. 2012-02-02 17:39:47 -08:00
AUTHORS.txt Add Ben Blum to AUTHORS.txt 2012-07-04 19:26:14 -07:00
configure Fail to configure without an LLVM-friendly Python 2012-06-25 20:18:09 -04:00
INSTALL.txt Bump version in INSTALL.txt 2012-03-28 22:45:13 -07:00
LICENSE.txt Add Clay license info to LICENSE.txt 2012-05-03 12:50:32 -07:00
Makefile.in configure: Don't turn on rustc's -g with --enable-debug 2012-07-02 17:22:49 -07:00
README.txt Rename some readmes and fix some dist logic. 2012-01-17 16:50:13 -08:00
RELEASES.txt Minor rewording in RELEASES.txt 2012-07-05 16:38:10 -07:00

This is a compiler and suite of associated libraries and documentation for the
Rust programming language.

See LICENSE.txt for terms of copyright and redistribution.

See http://www.rust-lang.org for more information.