The following built-ins are deprecated, but still working:
-
default
: This was deprecated with the introduction of the default value operator.exp1?default(exp2)
is near equivalent withexp1!exp2
, and(exp1)?default(exp2)
is near equivalent with with(exp1)!exp2
. The only difference is that prior to FreeMarker 2.4, thedefault
built-in has always evaluatedexp2
, while the default value operator only evaluates it when the default value is really needed. Starting from FreeMarker 2.4, however, thedefault
built-in was improved, and behaves exactly like the default value operator. -
exists
: This was deprecated with the introduction of the missing value test operator.exp1?exists
is equivalent withexp1??
, also(exp1)?exists
is equivalent with with(exp1)??
. -
if_exists
: This was deprecated with the introduction of the default value operator.exp1?if_exists
is similar toexp1!
, and(exp1)?if_exists
is similar to(exp1)!
. The difference is that the default value withif_exists
is not only empty string, empty sequence and empty hashs at the same time, but also booleanfalse
and a transform that does nothing and ignores all parameters. -
web_safe
: the same ashtml