Questions tagged [paradigms]

A tag for questions relating to the world view underlying a particular software methodology or theory.

A tag for questions relating to the world view underlying a particular software methodology or theory.

A paradigm is a model, method or pattern. In programming different methods of writing programs are called , examples are and functional programming.

More information on paradigms

291 questions
0
votes
1 answer

Should I use a global variable or is there any other option in this example?

I have a question regarding the use of global variable. I have a situation something like this: I have to loop through forest and then through hives to find the bee and then the bee should deposit honey in honey_jar. I could use this approach: class…
Nitish
  • 392
  • 2
  • 7
0
votes
2 answers

How is the Objective-C syntax similar to English?

So I know a bit of scripting and basic concepts of OOP, however when it comes down to writing actual code, the syntax kills me. I downloaded the Stanford course on iTunes U to try to learn Objective C, and the professor keeps reiterating that you…
Lucas
  • 37
  • 1
0
votes
1 answer

Proprietary development process

Is there a term specific to development that describes a company that has developed its own processes for development? More specifically, poor development practices, management, processes and QA testing that is also difficult to learn. Proprietary…
P.Brian.Mackey
  • 43,228
  • 68
  • 238
  • 348
0
votes
1 answer

Getting functional method name in Java

I have run into an issue with functional programming since I want to be able to get the method name, but it's not so easy to do as it is with OOP. It makes my code very clean to stay in functional programming, so I'm wondering if I can achieve what…
biopython
  • 13
  • 2
0
votes
0 answers

What is the name of the relation that the attribute have to the class that contains it?

Theoreticaly speaking, if class A has an atribute B, B is an attribute of A, but A is what of B?
0
votes
0 answers

Is there a Programming Concept of Additive/Supplemental ForEach?

My question contains 2 subquestions, therefore it is not limited to java but takes programming paradigms in general into consideration. I need a Loop which does a usual "forEach" but also provides for each index its previous runs. Let me…
Levent Dag
  • 162
  • 8
0
votes
0 answers

different between "&" and "and" in expressions

I have this question and I'm really confused ! What different between "&" and "and" in expressions ? and how can I compute the result of of (and, &) operations, should I convert the numbers to binary ?
Eva
  • 31
  • 6
0
votes
1 answer

How to avoid if-else multiple checks (spaghetti code) in typescript

General question: How to avoid if-else ugly code when you have to deal with multiple checks based on some string type? Example: I have an object "Task" in TODO app, which can be of different types, e.g. simple checkbox, textarea, date, a…
Sergiy Seletskyy
  • 16,236
  • 7
  • 69
  • 80
0
votes
0 answers

Is there a name for the programming paradigm jQuery suggests?

I have written little code with jQuery. The one thing I first noticed is that it “reverses” the logic between “caller” and “action”. What I mean by that is instead of having an html button which points to a javascript function when clicked, you now…
user12546101
0
votes
5 answers

Threading paradigm?

Are there any paradigm that give you a different mindset or have a different take to writing multi thread applications? Perhaps something that feels vastly different like procedural programming to function programming.
user34537
0
votes
2 answers

How to work with labels in mozart oz to get the elements from pair/tuple?

I'm new to mozart oz and I have this problems to solve: a) Implement a function Zip that takes a pair Xs#Ys of two lists Xs and Ys (of the same length) and returns a pairlist, where the first field of each pair is taken from Xs and the second…
Cipri
  • 15
  • 1
  • 6
0
votes
1 answer

How to include a cpp in another cpp like copy-paste rather than declaration-wise?

I recently adopted a style where I try to avoid unnecesary classes / scopes, so the code cannot be splitted in files by classes or functions, since almost everything happens in main. Of course for a lot of lines of code, this will be pretty hard to…
Popescu Flaviu
  • 95
  • 2
  • 11
0
votes
4 answers

In Python, is there a clean way to return the value of a function if it's not None?

I find myself writing a lot of code that resembles the following: ans = call_function() if ans: return ans ... Is there a clean way to make this a 1 or 2 liner? An "example" of such a paradigm might be if x as call_function(): return x
ankur
  • 125
  • 1
  • 7
0
votes
0 answers

Correct way of operating on exact numbers in CGAL

Consider the following minimal example: #include #include "CGAL\Exact_predicates_exact_constructions_kernel.h" typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef Kernel::FT NumberType; int main() { int…
simonet
  • 295
  • 1
  • 14
0
votes
1 answer

What should a purely object-oriented language look like to be "widely" used?

The most object-oriented language I know is Smalltalk. Its unique feature compared to other languages is to define everything as an object. However (if we don't take into account historical events), isn't it this particularity that has made it a…
Foxy
  • 980
  • 8
  • 17