It is no surprise that one of the biggest challenges in the enterprise software development is complexity. Change is inevitable. Especially when a ...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Naveen!
I'm sorry, but do you have any reference (papers, books, and so on) to support this affirmation: "Imperative programming styles like object oriented programming"?
Thanks for your attention!
Hello Fabricio,
In my opinion, it means different things to different people. It is hard to make a definite statement to say that OOP does or doesn't belong to Imperative programming style.
Having said that, OOP is a way of managing state in an imperative program.
Hi Naveen.
"It is hard to make a definite statement to say that OOP does or doesn't belong to Imperative programming style."
And yet you made one for some reason. :)
OOP is no more imperative than Functional is imperative. If you write impure functions you're not really being functional you're being imperative. If you write mutable objects full of procedures ("sequences of statements") you're not really being OO you're being imperative or procedural.
I'm not sure what was in your blood stream, but it doesn't sound like it was OO. ;)
It seems like a blasphemy here if you mention some language, other than JS, can be used (or even worse: used for FP). Not sure why but many JS devs have this urge to show everyone JS is the best programming language out there (p.s. it isn't). Comments are mostly about the authors and code he wrote. I agree, if you publish some code online, even in blog post, it should be working, but it would be much better if we stick to the topic, rather than discussing the author. It's childish how people try to justify their language of choice by claiming their language is the best, and paradigm supported by that language is the only right one. If you catch yourself saying JS is better than C# (Java, C++...) or vice versa I have bad news for you: you're lousy software developer. If you catch yourself saying FP is better than OOP or vice versa I have bad news for you again: you don't understand neither of them. You're no different to any other extremist finding his holly grail.
First of all FP is around for so long, obsessing about it these days looks like obsessing about invention of wheel.
As a predominantly .Net developer I mostly rely on OOP. But that doesn't mean I don't use FP. Yes, C# supports FP programming style, probably not as good as some pure (pun intended) FP languages, but good enough to help you write better code. And it's been like that for years, with each new language spec supporting FP even more. If you want to criticize C# or any other programming language please write some code in it first. If you truly understand OOP and FP, you will find out you can use both of them. They both have pros and cons. If you manage to get pros column of both to your code, you have a winner.
Your code has a huge flaw in that you aren't outputting what is being calculated. You are outputting the index of the item being multiplied, not the actual value being multiplied.
What is the point of writing FP in C#?
What is the point of writing OOP in C#?
What is the point of writing in C#?
--- oh! wait! I'm a c# developer!
You know what a rhetorical question is, right?
">
Nice little article. Here to follow is a little nitpicking :)
You use the term "memorization". The correct term for what you reference is "memoization".