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

Main construct of logic programming paradigm

We say that: in procedural paradigm the main construct is the 'procedure'; in OOP paradigm the main construct is the 'object'; in functional paradigm the main construct is the 'function'; but what's in logic paradigm? axiom? predicate? I'm…
xdevel2000
  • 20,780
  • 41
  • 129
  • 196
0
votes
1 answer

Scala quick sort

object QuickSort { def main(args: Array[String]) = { val a = Array(5, 3, 2, 1, 20, 46, 9, 39 ,219) sort(a).foreach(n=> (print(n), print (" " ))) } def sort(a:Array[Int]): Array[Int] = { if (a.length < 2) a else { val…
Jurgen Cuschieri
  • 658
  • 14
  • 33
0
votes
2 answers

What is so unique about Ruby that Rails chose it as its development language?

I am very new to Ruby and Rails, so if this is a dumb question, please bear with me. The ideas that Ruby adopted are not so new and revolutionary. Functional programming, dynamic typing and meta-programming, they exist in other languages as…
Cui Pengfei 崔鹏飞
  • 8,017
  • 6
  • 46
  • 87
0
votes
2 answers

What type of programming paradigm is this?

In some languages you can do a lot very easily. For example: if I want to get a value of a XML document, I can easily write this line of code: result = XML.GetValue("root/element/element"); What type of programming paradigm you can infer from this…
wiki
  • 1,877
  • 2
  • 31
  • 47
0
votes
1 answer

What specific problems does Declarative Programming solve best?

I understand what declarative languages have to offer, but I have not yet connected the dots as to why I would use them. For example, I do not understand why describing a problem is more beneficial than writing a solution to an already understood…
Sage Gerard
  • 1,311
  • 8
  • 29
0
votes
3 answers

Coding Paradigm: Should I Return 0 if Function is Successful?

When I'm writing a user define function, should I return 0 if the function is successful or a non null value? I personally like to return 0 if my function is successful, but I always see error handling more like (!var) and less like (var != NULL). …
0
votes
2 answers

SQL Programming Paradigm - Client vs. Server

I'm working on an MS SQL database at work. We're in early development, and I'm playing around with PHP while a coworker of mine is using ASP.NET. In the end, we'll probably combine our efforts and stick with one or the other. For this reason, I…
Andrew
  • 4,145
  • 2
  • 37
  • 42
-1
votes
1 answer

Making a Racket function that applies to lists

How to apply a function to a list in the racket?
Danilobol
  • 33
  • 4
  • 12
-1
votes
2 answers

I need to make a function in Racket that removes elements similar to each other from the list

I need to create a function in Racket, but I found the examples a little confusing. I need to create a function that removes the elements similar to each other from the list. You can pass a function that determines the similarity or not (this…
Danilobol
  • 33
  • 4
  • 12
-1
votes
1 answer

Should I use OOP when encapsulation is essentially ignored?

I am making a Mathematics web program which allows the user to compute and prove various quantities or statements, e.g. determinant of a matrix, intersection of sets, determine whether a given map is a homomorphism. I decided to write the code using…
-1
votes
1 answer

Among regular and context-free grammars which one is more powerful. Please give me the reason too

I was just going through the principles of programming languages. I know the concepts of regular and context-free grammars and their usage. But still I am unable to decide which one is more powerful and why. Please help Thanks in advance.
-1
votes
1 answer

Python: What Programming paradigm does this follow if any?

For the past two day's, I have been exploring decorators and how they can be used to create and modify classes without difficulty or effort. This exploration lead to this piece of code. Factory.py #!/usr/bin/env python import sys import…
Ricky Wilson
  • 3,187
  • 4
  • 24
  • 29
-2
votes
2 answers

Making a programming paradigm

What are the steps of making a programming paradigm? If you like, please give some light illustration on the procedural programming paradigm. Also, I'd love to be referred to some light/introductory/overall-view texts.
wajed
  • 503
  • 2
  • 6
  • 10
-2
votes
2 answers

Push Pull Model in Web Development

I would like to create for myself a base core (or package) for handling interactions between the server side and client side. My approach is this: Set the time interval to every two seconds (arbitrarily picked) Create a script on the PHP side. …
Brandon Dixon
  • 1,036
  • 9
  • 16
-2
votes
1 answer

Returning variable from nested function to global scope

I have a bunch of nested functions, some of which return values that I would like to get out to the global scope. What is the best way to do this? This is my example: function mainFunction(){ function A(){ //somecode …
kennsorr
  • 292
  • 3
  • 20
1 2 3
19
20