Questions tagged [statements]

For questions relating to statements, a small unit of code that expresses a certain action, in programming languages.

Filter by
Sorted by
Tagged with
8 votes
5 answers
3k views

Would it be safe to introduce the "freeze" statement?

Would it be safe to introduce the freeze statement for freezing a mutable object into an immutable object? Such statement would mix well into dynamically-typed ...
Dannyu NDos's user avatar
6 votes
5 answers
472 views

What languages have semantics with more than one "way" to execute each statement?

This is a difficult question to get across because I don't think there is an established term for what I'm asking about. In the title I've called it "ways" of executing statements, but I ...
kaya3's user avatar
  • 17.6k
9 votes
3 answers
244 views

What are the advantages/disadvantages of distinguishing statements and expressions?

Some languages distinguish expressions from statements so that something like int x = 2; foo((x += 2)); is invalid. Other languages don't, so that a similar ...
Aman Grewal's user avatar
4 votes
4 answers
192 views

How would I describe an expression seperately from a statement?

I have thought about how I could specify an expression separate from a statement. A fragment of code that resolves to a value. But void expressions are still ...
user16217248's user avatar
  • 7,535