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

I think both #1 and #2 have side effects (interactions with external mutable state.)

1. The side effect here is an input, and affects the output value of the function.

2. The side effect here is an output (or "action"). Displaying a dialog window mutated something in the external state of the program.

Technically, I think "side effects" are undesired interactions. So #2 might just be an "effect" since it is presumably desired. So maybe:

1. Side effect

2. Effect



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

Search: