3 ms·
If the goal is [fast, compiled, statically typed], a language like Crystal [1] would probably be a better fit for the author: require "yaml" config = Y
by ricardobeat 10y ago
If the goal is [fast, compiled, statically typed], a language like Crystal [1] would probably be a better fit for the author:
require "yaml"
config = YAML.parse(File.open("test.yaml"))
[1] http://crystal-lang.org http://crystal-lang.org
- brobinson 10y agoDoes Crystal have YAML.load_file like Ruby does? Loading a YAML file only requires one method call in Ruby.
- ricardobeat 10y agoCrystal does async IO underneath, so this approach allows the use of a streaming parser (you're just passing it a file handle, not the contents).
- brobinson 10y agoCool, thanks!