Using both OOP and Function programming paradims [closed] - oop

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I read about OOP and Function programming. And I found both have pros and cons.
Such as:
OOP: have side effect, and sometimes it is very usefull
Function: easy to code and think. But don't have side effect and loop.
And I wonder if I can using both OOP and Function paradigm in one project. Is it be recommended in practice?

There's nothing preventing both paradigms from being used together. Arguments on each side sometimes can be misleading as people tend to focus on languages and their features as opposed to the paradigms themselves. OOP doesn't need to have state/side effects, and functional programming doesn't always make things easier or faster. The good engineer will use the right tools for the right task, which means getting a good understanding of both.

Related

Thinking in SOLID principle during the design process [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm new to SOLID principle and design, I understand the principle however, I have a hard time knowing where to start the design process. I understand that design is an iterative process, what step or question you ask yourself during the design process so your design conforms to SOLID.
Try test-driven development. In an object-oriented context, you'll typically have to explicitly consider both the Open Closed Principle, the Dependency Inversion Principle, and the Liskov Substitution Principle in order to make your system under test testable and deterministic.
There are other ways to make APIs testable. If, for example, you're using functional programming, pure functions are intrinsically testable. In that case, you don't need to explicitly think about SOLID.

Understanding Java API's [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I wanted to ask little bit generic question about Java API's. I'm new in Java, learning myself and of course I enjoy it while learning. But when it comes to Java API's, to me it's hard to understand even if I know OOP's Concepts. Actually I often confuse while reading JavaDoc's. Agree that there are bunch of information about what class's(interface, enum..) has, what they extend, implements or whatever. Even though I couldn't use them without looking from the internet.
So, what is the best way of learning those API's in general, just give me your followed way while learning Java.
The best way to learn Java is to read articles with examples. It is common approach for newbies and professionals. JavaDocs is dry, too formal and really are often confusing (especially for methods from Stream API with 3+ generic parameters).
The way I did was to read certification books, for OCA and OCP, they start from the very basic, and builds up on the top of that, with examples and exercises.
It is a really nice way to build your core knowledge of the language. With that solidified knowledge you can start reading articles about different subjects in the Java universe ...
Just be patient, code as much as possible, and it will become natural aftar some time.

Why Inheritance is one of the four major principles of OOP, but not Composition? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
How Composition is a lesser principle level, than Inheritance? One always has to consider Composition over Inheritance, but there is no mention of Composition in the four major OOP principles. What is the reason behind this? Are they not at the same level?
Composition is a lower-level and a much older concept than inheritance; it comes from the analysis-synthesis approach which basically states that things are either composed of other things or trivial (atomic). It was first introduced back in ancient Greece as a general approach to understanding things.
Composition is not specific to OOP, e.g. in plain C, which is far from being OO, structs are authored using composition, likewise in functional programming functions are composed of other functions, though the nature of composition is totally different in these two examples.

Where's a good starting point for programming? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I recently started looking at programming and have been quite interested in it. The only bad thing is that I don't know how code works, where I can write it, or what languages to take into consideration.
I want to learn how to make applications for the iOS operating system, and i heard Objective C is the language for that. Is Objective C something you would recommend to a beginner?
I just wish I could grasp the concept of programming a little better and get a better understanding because, as of right now, it seems extremely complicated.
As a beginning programmer, I would advise that you'd be better served learning how computers and programs work as a general concept, which will orient your thinking as to how programs are made.
I've heard lots of good things about the Haskell language in this regard, and I would recommend you start here: http://tryhaskell.org
Once you have a good concept of how programs work, and what kind of thinking and organisation is required, then you can move on to languages like C/Objective-C, which would be very frustrating to start on.

what is the current use and future of icon programming language [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
While studying different programming languages, I recently hit upon Icon programming language. It seems to have quite cool syntax and functions for string scanning, goal directed execution, generators etc. and it was developed quite a few decades back (1977).
There doesn't seem to be much information available on it regarding the places it is used currently. It doesn't seem to be actively developed or supported also. I was wondering if people really use this language in certain niche areas even today or is the language now primarily of historical interest? Will it have much relevance in future also?
The TIOBE programming language index http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html places it somewhere between 50th and 100th in terms of
the number of skilled engineers world-wide, courses and third party vendors.
If it hasn't gotten any further than that since 1977, I doubt it ever will.
If you're into "cool," complex languages with sophisticated capabilities, Scala may scratch your itch.