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

IMO, imperative programming is only intuitive for imperative tasks. Many common programming tasks may be imperative, but many are not.

Looking up a product number, placing that product in cart, and checking out is a naturally imperative flow. Humans would think about this somewhat imperatively and iteratively if they were doing it in the real world.

However, other tasks like formatting or searching data are usually not intuitively imperative in my experience. As programmers, we build a habit for translating these ideas to imperative sequences, but I don’t think that’s obvious to people who haven’t practiced it.

Compare a regular expression to a 40 line manually-written matching algorithm. If you ignore syntax, I think many people would agree that the regular expression which directly describes the goal is more intuitive to think about than the imperative machinery that achieves the same thing.



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

Search: