Skip to main content

Questions tagged [semantics]

For questions related to the semantics of programming languages, i.e. the intent, meaning and action of syntactically valid code.

34 votes
6 answers
6k views

I actually drafted most of this question before the relevant stack overflow question but it's still relevant. C has a famously confusing operator precedence order. It is divided into 15 levels and ...
mousetail's user avatar
  • 9,627
7 votes
2 answers
829 views

This question is about the expected semantics when combining resource management with branching control flow. From my perspective, it applies equally to all finally-...
feldentm's user avatar
  • 2,498
5 votes
1 answer
237 views

I'm looking for prior art on languages handling clashes happening during template instantiation between inner entities. For example, if we have a type parameter E intended to be an exception type and ...
feldentm's user avatar
  • 2,498
5 votes
1 answer
212 views

Apparently, Go can implement a dead store analysis in the compiler without a CFG. I stumbled upon this example: ...
feldentm's user avatar
  • 2,498
32 votes
4 answers
3k views

From https://rtfeldman.com/0.1-plus-0.2, on different floating point number semantics: Go takes a different approach. When you write 0.1 + 0.2 in Go, that expression gets evaluated to 0.3 at compile ...
osa1's user avatar
  • 847
2 votes
1 answer
737 views

I'm a big fan of Algol 68's treatment of variables. "Variables" are just constant references that point to memory allocated on the stack or on the heap. When you refer to a variable or a ...
texdr.aft's user avatar
  • 323
2 votes
1 answer
329 views

Correct me if I'm wrong, but as I understand it, a compiler infrastructure such as Roslyn and maybe the JavaParser's symbol solver defines a semantic model with an unified semantic data type often ...
Hydroper's user avatar
  • 1,047
3 votes
1 answer
124 views

The ActionScript 3 specification frequently uses the term "frame" within the verification phase such as in: (1) Code inside a with statement will have a <...
Hydroper's user avatar
  • 1,047
20 votes
3 answers
3k views

I want to give an exact specification of the meaning of my programming language. I know how to write an interpreter for it, but: I don't want to require people to read the interpreter code to learn ...
David Young's user avatar
  • 2,532
11 votes
4 answers
1k views

Let's say I have some code in my target language like: ...
Rob N's user avatar
  • 1,185
10 votes
1 answer
730 views

Denotational semantics associate each term in a program with some mathematical object representing the meaning of that term. When I see denotational semantics explained (e.g. in this answer), this is ...
kaya3's user avatar
  • 22.4k
6 votes
5 answers
592 views

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
  • 22.4k
3 votes
1 answer
329 views

There are three standard evaluation strategies for the lambda calculus: Call-by-value (CBV) Call-by-name Call-by-need There are two variants of CBV that differ on how they behave with respect to ...
user76284's user avatar
  • 209
24 votes
8 answers
5k views

In Go, capitalized identifiers are public (exported), while lowercase identifiers are private (within the package it's defined in). Most other programming languages don't have this sort of semantic ...
bigyihsuan's user avatar
  • 1,861
5 votes
1 answer
228 views

I'm trying to find an algorithm/data structure behind type resolution without forward declaration. Something a little bit like this in Java: ...
Clément Jean's user avatar

15 30 50 per page