Crates.io | latin |
lib.rs | latin |
version | 0.1.7 |
source | src |
created_at | 2016-02-28 06:09:57.520163 |
updated_at | 2017-04-30 22:55:00.966638 |
description | A standard library with a focus on common operations. |
homepage | https://github.com/TyOverby/latin |
repository | https://github.com/TyOverby/latin |
max_upload_size | |
id | 4316 |
size | 10,618 |
Simple things should be simple, complex things should be possible. -- Alan Kay
Rust's standard library is an impressive feat of engineering. It manages to stay consistent, performant, and extendable. However, performing simple tasks and remaining general are often at odds. Take for example the task of writing some text to a file. With the rust stdlib an implementation would look like this:
use std::io::Write;
let mut file = try!(std::fs::File::Create(FILE_NAME));
try!(file.write_all(CONTENTS));
std::mem::drop(file);
All the verbosity comes from the rust standard-library's goal of staying general; however, readability takes a hit.
Latin attempts to take as many common operations and make them as clear and easy-to-remember as possible. The same program as above written with Latin would be
try!(latin::file::write(FILE_NAME, CONTENT));