Posts

Showing posts from August, 2017

The Rust Language

I've been writing in Rust a couple days and I can say that Rust is a nice language. Thanks to its ownership and borrow mechanisms, the semantics of a snippet of code can be very clear . And that's also one thing I like about Go, as compared to C++, in that the semantics of the code can't be mistaken as the language is so simple. But at the current version (rustc 1.19.0), there is an ergonomic issue regarding the match expression and borrow checker, that I want resolved before I really start using the language. It is represented by this issue  rfc#811  and I hope it would be resolved soon. The issue I encountered is: I want to look inside an enum value and move the value in certain condition, possibly to pack it in an Error object and pass it up. In order to use an enum type value you have to go through an match expression one way or other. So here is me trying my hand at a rudimentary assembler, ...again. enum Expr { Identifier { value: String, token: Token ...

Bazel

Image
 Bazel is a build automation tool from Google with an emphasis on correctness and speed .  You should use it, and spare other people the pain of having to read more Makefiles. Thank you.  And it's trivial  to use. See, I managed to build with Bazel a sample program dependent on the ICU4C and it only took an whole day to figure out how to write appropriate BUILD files.  To mark more of its glory, here is a part of the dependency graph of a project that you can generate from Bazel with its built-in query feature: Glory