Issue #15329 has been updated by Henrik Lindberg.
Nothingness is a quite complicated topic - here is how nothingness is handled in Scala: http://oldfashionedsoftware.com/2008/08/20/a-post-about-nothing/ In Puppet DSL, the semantics are quite `undef` as `undef` serves both as a symbolic "nil", has no value, and as anti-matter (annihilates the expression). To keep sanity it is probably also required to modify the auto type conversion to boolean. Currently some type of emptiness (string is empty) is true, but not other forms. Is nil true or false? (IMO neither). Auto conversion to boolean is just a source of WAT. Without too much exploration, I think the best approach could be to introduce "nil" (or "null") as a new Literal with the same semantics as Java or Ruby null/nil (i.e. somewhat ambiguous), as the much more sophisticated Nothingness definitions available in Scala is not all that useful in a semi-untyped language. Think first step towards doing something about this is to clearly define "undef" and "nil" and perform a thorough analysis. ---------------------------------------- Bug #15329: Puppet lacks a proper "undefined" value https://projects.puppetlabs.com/issues/15329#change-72862 Author: Pieter van de Bruggen Status: Accepted Priority: High Assignee: Pieter van de Bruggen Category: Target version: Affected Puppet version: Keywords: Branch: $y = undef notice($y == "") # true notice($x == $y) # true notice($x == "") # true Recent changes in the Puppet DSL made equality commutative (good!), but in doing so broke work-arounds for actually testing for the difference between an undefined and "empty" value. The most logical fix would be to equate Puppet's `undef` with Ruby's `nil`. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
