3 ms·
I think inverted callbacks is a strange way to describe just standard function calls. Unless you also call 'a.b' a callback, I don't think 'f a' could be calle
by cgag 13y ago
I think inverted callbacks is a strange way to describe just standard function calls. Unless you also call 'a.b' a callback, I don't think 'f a' could be called an inverted callback. It's just a standard function call without any special treatment of it's arguments (like self in most OO languages).
I agree with you that it's hard to remember not thinking functionally. I've only been doing it for maybe 3 years and it's hard to remember what it felt like when I was first trying to wrap my head around it.
With macro's, I think you mean to say your own special forms, not functions. They allow you to take in code as arguments, and determine when that code will get evaluated, letting you write things like "or" as macros, when it most languages they have to be implemented as built-in primitives (special forms).
- geuis 13y agoSee, the way you think and try to describe the problem is right. But the point I am making is that often giving someone the correct answer doesn't help them make the mental connections they need to get the Eureka! moment of understanding about the fundamental nature of the topic. Just reiterating the same definitions over and over to someone is somewhat like talking to someone in Farsi who grew up in rural China and only speaks a local dialect of Mandarin. Sometimes we have to point at things and make funny baby noises so people can ramp up their learning. So when I said functions instead of forms, I did that because a) I don't understand the difference yet and b) that's not the point. I'm documenting how I, as someone new to both clojure and a stricter sense of functional programming, am starting to learn these concepts. Eventually I'll grok the Matrix and all of this will seem hopelessly simpleminded. But for me right now, this is where I am on the road.