Re: [rust-dev] Writing cross-platform low-level code

2011-11-15 Thread Brian Anderson
On 11/15/2011 12:04 AM, David Rajchenbach-Teller wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/14/11 9:53 PM, Brian Anderson wrote: On 11/13/2011 11:53 PM, David Rajchenbach-Teller wrote: *** #ifdef My code heavily relies on #ifdefs with macros to compile code conditionally, depe

Re: [rust-dev] Writing cross-platform low-level code

2011-11-15 Thread Niko Matsakis
Yes, I was thinking something similar yesterday. Such a pattern might well be perfect. On Nov 14, 2011, at 11:40 PM, David Rajchenbach-Teller wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/15/11 12:47 AM, Niko Matsakis wrote: >> >> On Nov 14, 2011, at 12:53 PM, Brian And

Re: [rust-dev] Writing cross-platform low-level code

2011-11-14 Thread David Rajchenbach-Teller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/15/11 12:47 AM, Niko Matsakis wrote: > > On Nov 14, 2011, at 12:53 PM, Brian Anderson wrote: > >> std has a 'result::t' type that I am trying to use for this >> purpose. std::io makes use of this now. > > Besides exceptions, I do not have a be

Re: [rust-dev] Writing cross-platform low-level code

2011-11-14 Thread Niko Matsakis
On Nov 14, 2011, at 12:53 PM, Brian Anderson wrote: > std has a 'result::t' type that I am trying to use for this purpose. > std::io makes use of this now. Besides exceptions, I do not have a better alternative than `std::result`. However, I fear that if we go too far down this style, it will

Re: [rust-dev] Writing cross-platform low-level code

2011-11-14 Thread Brian Anderson
On 11/13/2011 11:53 PM, David Rajchenbach-Teller wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear Rusties, I am currently in the early stages of writing a file system access library for mozilla-central that might eventually replace some or all of mozilla-central low-level fil

[rust-dev] Writing cross-platform low-level code

2011-11-13 Thread David Rajchenbach-Teller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear Rusties, I am currently in the early stages of writing a file system access library for mozilla-central that might eventually replace some or all of mozilla-central low-level file access code with something faster and a little higher lev