On Tuesday 10 August 2010 02:34:33 Lars T. Kyllingstad wrote: > I guess it depends on what behaviour you're after. In the present case, > if you want chomp(a, null) and chomp(a, "") to do the same thing, then > you should use '=='. If you want chomp(a, "") to simply do nothing, use > 'is'. I just figured that the former was the desired behaviour here. If > it isn't, I agree with you. :)
I was really talking about the general case rather than chomp() in specific, but's fine with me if "" and null are treated the same here, I suppose. Still, I really don't like it when null and empty is treated the same way (in D or anything else). There's a difference between something not existing and it existing but not having anything in it. But, as I said, we're stuck with the way it is in D. - Jonathan M Davis