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

What about it looks terrible? The braces are necessary, because this is a lambda.


I'd say that $_ is really weird and looks horrible. Also having to do (10 * 1024 * 1024) instead of just writing 10MB is a downgrade even compared to POSIX-compliant sh. In my other comment I've added a few examples in sh, zsh, and a better PowerShell example:

   gci | ? Length -gt 10MB | sort LastWriteTime


You don’t need the lambda. Where-Object can just take the Length property.




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

Search: