As you said, the type system can not enforce this rule, that's why
the documentation have no choice but to say the behavior is undefined.
If the code you write relies on None being returned forever, then you
should use the Fuse iterator adaptor, that wraps an existing iterator
and enforces this
I really like the API you are proposing. In particular, the error handling is
close to what I was expecting from such an API.
I have some remarks, though.
Is there a reason for encoders and decoders to not be reusable ? I think it
would be reasonable to specify that they get back to their
Le vendredi 20 septembre 2013 11:47:04 Simon Sapin a écrit :
Le 20/09/2013 10:18, Olivier Renaud a écrit :
I really like the API you are proposing. In particular, the error handling
is close to what I was expecting from such an API.
I have some remarks, though.
Is there a reason
Le vendredi 20 septembre 2013 11:52:14 Simon Sapin a écrit :
Le 13/09/2013 23:03, Simon Sapin a écrit :
/// Takes the invalid byte sequence.
/// Return a replacement string, or None to abort with a DecodeError.
condition! {
pub decoding_error : ~[u8] - Option~str;
}
///
You will find some more informations in this recent Stackoverflow question :
http://stackoverflow.com/q/16504643/112053
Le mercredi 29 mai 2013 10:53:41 Ziad Hatahet a écrit :
Hi all,
Does using Option incur a runtime cost (like increased memory usage)
compared to a hypothetical case if
Hi,
I am not the OP, but this question made me curious.
If I understand the problem correctly, the type system makes a strong
distinction between an @Struct and an @Trait. And ptr_eq seems to accept
@Struct only.
How can this restriction be inferred from the signature of ptr_eq ? Is this
Hi,
2013/5/3 Graydon Hoare gray...@mozilla.com
(Erm, it might also be worthwhile to consider message catalogues and
locale-facets at this point; the two are closely related. We do not have a
library page on that topic yet, but ought to. Or include it in the lib-fmt
page.)
If you
On 2013-05-04, at 13:15 , Olivier Renaud wrote:
Gettext is indeed dependent on the fact that the format syntax allows
positional parameters.
Not really, since gettext does not do formatting it does not care and
because different languages may need to reorder parameters it's usually
better
Instead, we could perfectly imagine a gettext-like equivalent that takes
both an original format string (to be translated) *and* its arguments and
then will use fmt! under the hood to produce a fully translated string to
be fed to the Writer instance.
I'm sorry, but I don't see how your
Maybe we can consider `:=`, if `=` alone is ambiguous.
- Message d'origine -
De : Patrick Walton
Envoyés : 03.05.13 03:12
À : rust-dev@mozilla.org
Objet : [rust-dev] RFC: Pattern matching binding operator
Hi everyone,
There's consensus that `@` (imported from Haskell) is a bad binding
Considering the content of the current libstd, I think util is indeed an
appropriate name for this module.
Some other propositions :
- base
- rust
- platform
- stock
Maybe it is from spending too much time with java, but I tend to name those
kind of libs `util`,
because often what they are
was seeing all pages as writeable except this one. Certainly a
mistake on my part.
Sorry about that, I'll edit the wiki directly, then.
Cheers,
Olivier Renaud
___
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
Hi,
Would it be possible to leverage the macro system, so that a range can be
expressed using an intuitive syntax ?
Something like :
for range!(0 = x size) {
io::print(x);
}
or
for range!(10 v = 0) {
io::print(v);
}
- Message d'origine -
De : Niko Matsakis
Envoyés : 06.03.13
13 matches
Mail list logo