Fallbacks

Almost always, when you use a personalization tag, you'll want to provide a fallback value in case a particular constituent does not have a value for that tag, so that the email does not appear awkward

With the %%STYLE%% of tags, you would accomplish this by adding a parenthesis for what should be displayed for as a fallback value.

Dear %%NAME(Friend)%%,
Dear Jane,
Dear Friend,

Twig provides a few other options that, while slightly more verbose, are far more powerful in what they can accomplish.

The following are both equivalent to Dear %%NAME(Friend)%%.

Dear {{ cons.name | default("Friend") }}

Dear {{ cons.name :? "Friend" }}

Where Twig really shines is the scenario where you don't have a straight fallback that meets this standard. For example, what if you have prefix information for some members of your list with military titles and are in a specific group, and want to address them differently than you might other users?

{% if cons.prefix and cons.name and cons.inConsGroup(1) %}
 Dear {{ cons.prefix }} {{ cons.name }},
{% elseif cons.firstname %}
 Dear {{cons.firstname }},
{% elseif cons.name %}
 Dear Friend,
{% endif %}
Dear General George Washington,
Dear George,
Dear Friend

Because Twig is capable of multiple layers of conditions, it can accomplish much more granular and complex logical flows than the old style of tags were capable of.