Programming languages based on the paradigm of imperative programming.
Questions tagged [imperative-languages]
11 questions
24
votes
4 answers
Can you explain lambda expressions?
I don't really get lambda expressions. While they've been around since the days of ALGOL, I didn't start hearing about them until fairly recently, when Python and Ruby became very popular. Now that C# has the => syntax, people in my world (.NET)…

Robert S.
- 25,266
- 14
- 84
- 116
7
votes
0 answers
Do lazy imperative programming languages exist? If not, why not?
If I'm not mistaken, the concept of a "lazy imperative programming language" makes perfect sense.
For example, I envision that the following code should cause the program to print "7"
a <- 1
b <- a+5
a <- 2
print([b])
while the following code…

goblin GONE
- 540
- 3
- 12
5
votes
5 answers
Writing functional programs in non-functional languages
Suppose I write a program using immutable data structures in Java. Even though it is not a functional language, it should be able to execute parallely. How do I ensure that my program is being executed using all the cores of my processer? How does…

Pranav
- 3,340
- 8
- 35
- 48
5
votes
5 answers
Is functional programming considered more "mathematical"? If so, why?
Every now and then, I hear someone saying things like "functional programming languages are more mathematical". Is it so? If so, why and how? Is, for instance, Scheme more mathematical than Java or C? Or Haskell?
I cannot define precisely what is…

kolistivra
- 4,229
- 9
- 45
- 58
1
vote
1 answer
How far from imperative can language implementations be where compiler/interpreter emits to metal
I didn't want to ask this as an 'answer' to A Question Someone Beat Me to by 2 Years
so I did a new question. It appears from an answer there (See N. Ramsey where he writes:
"...However, if you look up the pioneering work of Professor Arvind at
…

klausnrooster
- 520
- 3
- 13
1
vote
1 answer
Example of an imperative language
Say, I need to add two matrices. And, I want to solve this problem in the imperative paradigm.
Imperative Programming
Programming paradigm
From (1) know that
The canonical examples of imperative programming languages are Fortran and Algol. Others…

user366312
- 16,949
- 65
- 235
- 452
1
vote
3 answers
Printing a tree — attempted access of field, but no field with that name was found
I'm am trying to write my first Rust program. I want to print a simple tree on the screen, but I cannot access a value property, it says
Error 1 attempted access of field value on type Node, but no field
with that name was found …

Alex Zhukovskiy
- 9,565
- 11
- 75
- 151
1
vote
2 answers
What does ∀id1 id2 : id, {id1 = id2} + {id1 ≠ id2} mean?
I'm reading Software Foundations book and in Imp.v file, there is this definition of a theorem eq_id_dec as follows:
Theorem eq_id_dec : forall id1 id2 : id, {id1 = id2} + {id1 <> id2}.
Proof.
intros id1 id2.
destruct id1 as [n1]. destruct…

elysefaulkner
- 973
- 2
- 8
- 8
0
votes
2 answers
Deciding the type of a custom language
I am thinking about small language specifically for graphs that would provide a lot of functionality to manipulate graphs and the like.
So when I was pondering over the syntax of the language, I read about the functional and the 'obvious'…

Gooner
- 1,380
- 2
- 14
- 25
0
votes
1 answer
What does it mean to convert a function to a table look up?
In this video titled Don't fear the monad, between 05:02 and 06:05, Brian Beckman says:
Every imperative programmer goes through this phase of learning that
functions can be replaced with table look-ups. Often, you do this for
performance. You…

Water Cooler v2
- 32,724
- 54
- 166
- 336
-3
votes
5 answers
Declarative Language
I was reading an article on Declarative Programming Languages.
If I don't understand the qualities of this type/paradigm of programming languages and it's contrast to Imperative languages, should I just read up on programming in this type of…

Chris Okyen
- 529
- 2
- 6
- 22