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

Nice trick, but you end up selling a LOT of readability and maintainability just to get a "cool feature". When in Rome, act like the Romans: wouldn't a nested for loop do the trick just fine, in a way any C programmer can understand?


I do not think that author considers it useful in real world programming. It is a cool hack, therefore we should treat it like one, and not complain about readability.


I think it's more than a hack. List comprehension is a way to look at list manipulations which comes from the functional paradigm of programming. It is interesting and instructional to see how it can be expressed in a heavily imperative language like C. I would say it's a teaching tool, not just a hack.




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

Search: