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

I agree that for these types of constructs a more functional style could look better. That being said the OOP approach as the merit of reading in the proper order: you get your args, pick the 1st and then use that or the default "y" value.

If you rewrite this to use function calls instead of methods you end up with something like:

    (or (cadr (args)) "y")
Which is fine if you're used to lisp syntax but it's really a matter of taste at this point.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: