scalatags
scalatags copied to clipboard
Any reason to still allow unit fragments in scala 3?
In Scala 3, if
without an else
always evaluates to Unit
. This means code like div(if (cond) h1("a"), ...)
now never produces anything, even if the conditions is true, which has lead to a few silent issues when we transitioned to Scala 3 where stuff suddenly wasn't rendered anymore. Are there any other reasons to keep allowing units in templates? If not, it seems better to disallow this now to avoid mistakes like this?