3 ms·
But...but...my life is like that macromanager Lol. Don't worry, sometimes I'm also doing micromanaging. I'm not trying to tell imperative is bad, because I'm st
by bepitulaz 10y ago
But...but...my life is like that macromanager Lol. Don't worry, sometimes I'm also doing micromanaging. I'm not trying to tell imperative is bad, because I'm still using it when I feel FP is not efficient.
I wrote that article to introduce FP to anyone who wants broaden their knowledge. By knowing another paradigm, we will get the right tools for the right jobs, right?
- kowdermeister 10y agoThe micro/macromanager analogy is flawed IMHO. I can write modular, component based code imperative style. It won't be worse than please().do().this().for(me) > I'm not trying to tell imperative is bad "In another word, the imperative one is an annoying micromanager" ;) > By knowing another paradigm, we will get the right tools for the right jobs, right? Yes, if you not only introduce the paradigm, but tell them when it makes sense to use it. I haven't seen it in your article.
- bepitulaz 10y agoHmm...I thought I had told them in the article. > According to sample number 2 above, we will read the loop 4 times to track the current value of sample. Imagine if you have an array with 1000 elements inside it. That is one of that. > ...made our code more concise and also in the summary. Well, I know maybe "concise" is a subjective thing :)
- kowdermeister 10y agoI've read that, but it really depends on the bug. A simple console.log would catch it easily. I think you need debugging skills in FP right? I don't always prefer concise code. It means that I have to keep everything in my head, what the function does exactly. So what I miss is real use cases. Would you write a video editor in FP? Would you make Quake 4 in FP? Is it good for Todo apps? CLI apps maybe? Or is it best for 50 line microservices?
- bepitulaz 10y agoHonestly I did almost anything using FP. Mostly in Clojure and Clojurescript. Btw, is using map, filter, reduce considered as using FP too? I always use it in my Swift and JS code. One of the thing that I can't use FP is in embedded development (arduino and esp8266).
- kowdermeister 10y agoI don't know, you tell me :) I use FP in my imperative code ;)
- bepitulaz 10y agoActually the part 2 will talk about that :)