|
It seems to me that functional programming is a great thing. It eliminates state and makes it much easier to automatically make code run in parallel.
Many programmers who were first taught imperative programming styles find it very difficult to learn ...
Started by Zifre on
, 15 posts
by 15 people.
Answer Snippets (Read the full thread at stackoverflow):
Very few teach it first not yet been ....
Many (most ?) schools teach functionnal programming.
Therefore, it's most useful to future coders to learn imperative programming.
Majority of shops use imperative programming.
|
|
Hello,
I am studying two main paradigms of programming, declarative and imperative paradigm. I am having a hard time following the ambiguous statements made on my textbook and wikipedia, such as:
declarative: - focuses on "what" the computer is to do....
Started by Midnight Blue on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Some imperative will be translated into the following imperative steps:
while (another row to process) read row from disk, however, is generally....
programming sequentially executes statements that may manipulate an underlying state.
|
|
Specially in comparison to C/C++ (which are declarative), how is Java imperative?
Started by cambr on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Edit: Imperative is do this, then do that, then do the next thing and so contrasts with ....
Basically, with declarative languages (e.g.C/C++ is imperative too.
To Declarative Programming and Imperative Programming .
|
Ask your Facebook Friends
|
Have had to write my first "proper" multithreaded coded recently, and realised just how little I knew about how "imperative-style" (ie, concurrency models used by C++/C#/Java, and the like) concurrent programming techniques.
What resources are there (...
Started by andrewdotnich on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Patterns for Parallel Porgramming is a good general book on concurrent programming book on multithreaded programming....
Doug Lea's Concurrent Programming in Java is an excellent book on the topic (though it is of course Java-specific).
|
|
(See end for summary of updated question.)
I want to convey to groups of people (kids or adults) how a computer program written in a high-level language works, and what the relationship is of that program to the computer as a consumer device as they know...
Started by talkaboutquality on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If they cooperate then they ....
Each team grabs half the key each and then neither can open the door .
You could demonstrate thread locking by having two teams competing to get two halves of a key that opens the door to some reward (sweets for kids etc.) .
|
|
I have a function specification that states it that should evaluate a polynomial function of one variable. The coefficient of the function is given as a list. It also accepts the value of the variable as a real.
For example: eval(2, [4, 3, 2, 1]) = 26...
Started by efritz on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can get rid of the need for an index (and a function to raise an int to the power of another int) by multiplying the sum with r in each iteration:
fun eval radix lst = let fun f (element... .
The usual way to express sums in functional languages is a fold .
|
|
Not best to learn, but easiest to learn. Not easiest for programmers, but for non-programmers (as a first language). Not opinions or anecdotes, but are there any studies?
I think that functional/declarative programming (Haskell, Scheme, Lisp etc) is more...
Started by 13ren on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I know that if language levels and a "....
You'll have to judge for yourself which factors are most important .
That said-designed programming environment.
And program flow before being hit with stuff like objects, pointers and immutability.
|
|
I'm reading 'Functional Programming' by Tomas Petricek & Jon Skeet and I understand the difference between declarative & imperative programming.
What I was wondering is how are the primitive operators & functions implemented, are declarative languages...
Started by AWC on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
185, McCarthy....
In theory, what I said above is true, but apparently in Hackers & Painters, p .
There are imperative Turing-Complete languages, and functional code, which is inherently imperative.
Interpreter/compiler for any other language.
|
|
My Manager asked me to code in ASP.net. What is meant my imperative and interrogative code. How it related to programmers?
Started by balaweblog on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
As opposedAlthough I'm not....
A C program is a good example of that.
Imperative this, do that" is an imperative program.
Quote
While imperative programming is the way most procedural code is written (C style).
|
|
Which techniques or paradigms normally associated with functional languages can productively be used in imperative languages as well?
e.g.:
Recursion can be problematic in languages without tail-call optimization, limiting its use to a narrow set of cases...
Started by Rob on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Pretty nearly all of them?
If you understand functional languages, you can write imperative programs in which reading the program text at any particular point is sufficient to let you really know what the meaning of the program....
|