Here is a small, but interesting tidbit. Yesterday I have finally sat down and documented a lot of the changes that I made in Brail recently, I was surprised to see how much I had to document:
- Auto Imports
- Strongly typed variables
- The "?variableName" syntax
- Null Propagation
The last part is what I want talk about now. Brail is a .Net language, which means that something like this:
will raise NullReferenceException if the user's parent is null. That can be somewhat of a pain in many scenarios. Brail now has a better syntax for this:
will ignore any null values that it encounter in the way. It is will either output the parent's name or nothing at all.
The small print:
This will work only for variables that you get from the controller via the PropertyBag or Flash. You can't use it on variables that you define in the view. However, that is rare enough that I don't think that it is going to be a problem.
Note that I didn't document the DSL support in Brail yet, that is going to wait until it is stabilized a bit.