On Friday, 6 February 2015 at 09:15:54 UTC, Derix wrote:
OK, we're doing some event-base parsing, reacting with a lambda
function on encountering so-and-do tag, à la SAX. (are we ?)
yeah
What I don't quite grab is the construct (in Element e) ,
especially the *in* part.
Function parameters in D can be qualified as in or out,
optionally:
http://dlang.org/function.html#parameters
(in Element e) means you are taking an argument of type Element
that you only intend to take in to look at. An "in" parameter is
const and you are not supposed to store a reference to it.
So basically, `in` on a function parameter means "look, don't
touch".