Passing functions into other functions as parameters, bad practice?
Posted
by
BlueHat
on Programmers
See other posts from Programmers
or by BlueHat
Published on 2014-08-20T09:39:44Z
Indexed on
2014/08/20
10:31 UTC
Read the original article
Hit count: 210
We've been in the process of changing how our AS3 application talks to our back end and we're in the process of implementing a REST system to replace our old one.
Sadly the developer who started the work is now on long term sick leave and it's been handed over to me. I've been working with it for the past week or so now and I understand the system, but there's one thing that's been worrying me. There seems to be a lot of passing of functions into functions. For example our class that makes the call to our servers takes in a function that it will then call and pass an object to when the process is complete and errors have been handled etc.
It's giving me that "bad feeling" where I feel like it's horrible practice and I can think of some reasons why but I want some confirmation before I propose a re-work to system. I was wondering if anyone had any experience with this possible problem?
© Programmers or respective owner