latin

Crates.iolatin
lib.rslatin
version0.1.7
sourcesrc
created_at2016-02-28 06:09:57.520163
updated_at2017-04-30 22:55:00.966638
descriptionA standard library with a focus on common operations.
homepagehttps://github.com/TyOverby/latin
repositoryhttps://github.com/TyOverby/latin
max_upload_size
id4316
size10,618
Ty Overby (TyOverby)

documentation

README

Latin

A simplified and extended standard library

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));

Ideology

  • Simple things should be simple.
    • Identify overly verbose code that is regularly re-written and make it a one-liner.
  • Preserve errors.
    • Latin should expose Results as they are in the code that they replace.
  • Expand beyond just found in the rust standard library.
    • Downloading files, parsing/saving images, are all on the roadmap.
Commit count: 7

cargo fmt