Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A pet peeve of mine is concatenating null strings. It's like a poison pill that nulls the whole result. 99.99% of the time that's NOT what one wants domain-wise. Maybe the standard should make another concatenation operator that treats null strings as zero length strings. Sure, one can de-null each string in the expression, but that's ugly anti-DRY code. Please fix it, I haaate that.


Agreed that it makes the pipe concat operator a lot less useful. Now PostgreSQL and MySQL both have CONCAT_WS which does replace NULLs with empty strings. It's also nice when you do need a common separator between all elements.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: