Skip to main content

Unanswered Questions

49 questions with no upvoted or accepted answers
13 votes
0 answers
155 views

Transforming imperative languages to continuation-passing style for evaluation

Continuation-passing style is a useful technique for implementing exceptions, coroutines, non-local returns, async/await, and ...
13 votes
0 answers
931 views

Where does Go's datetime formatting pattern come from? And why was it chosen?

Go's time formatting strings are uniquely idiosyncratic, and I have not seen any other language use this sort of system: It is based on the exact timestamp for ...
13 votes
0 answers
352 views

Why were OS/360 PL/I procedure calls so expensive?

In Guy Steele’s famous paper Debunking the “expensive procedure call” myth or, procedure call implementations considered harmful or, LAMBDA: The Ultimate GOTO, he describes the poor performance of ...
12 votes
0 answers
505 views

In C/C++, why does the logarithm of zero have a well-defined imaginary part?

By the C standard and the C++ standard: $\log(0+0i) = -\infty+0 i$. $\log(0-0i) = -\infty-0 i$. $\log(-0+0i) = -\infty+\pi i$. $\log(-0-0i) = -\infty-\pi i$. However, if the floating-point complex ...
12 votes
0 answers
345 views

How can a compiler optimise persistent data structures to use mutable data structures "under the hood"?

Consider for a motivating example a copy-on-write array, which implements a persistent (i.e. immutable) array data type. As an optimisation at runtime, a reference counter can be used to avoid the ...
10 votes
0 answers
158 views

How to detect changes to definitions and their impacts?

I'm implementing the Language Server Protocol (LSP) for my language, and I'm having huge problems tracking updated definitions. 1. How to determine which files have been changed? lsp can only monitor ...
10 votes
0 answers
311 views

What styles of interpreter are not well-supported by RPython?

The RPython toolchain translates interpreters to JIT compilers. The interpreter may be written in any style; the corresponding JIT compiler is defined by annotations on the main loops of the ...
10 votes
3 answers
768 views

Idiomatic memory allocation and garbage collection in LLVM

I am working on a new backend for a programming language using LLVM IR. This language makes a distinction between basic values and pointers to nodes on the heap, and uses a copying collector for ...
9 votes
0 answers
174 views

Non-trivial implementations of consume memory ordering

In the C++ memory model through C++23, one of the memory ordering types for loads is memory_order_consume. The intent of this was to expose the feature that most ...
9 votes
0 answers
307 views

Why do using-directives in C++ work the way they do?

There's already a question on StackOverflow regarding this, but I feel like this platform is more appropriate for the question. Why is it that when a using-directive is used inside a scope in C++, ...
9 votes
0 answers
237 views

How to usefully implement trig (and other irrational functions) on rational primitives

Based on my limited experience, most languages that have rationals as their primary number type simply do not have built-ins for sin,...
8 votes
0 answers
363 views

In ARM assembly, why is the bitwise OR operation called "ORR" (with double 'r'), rather than simply "OR"?

So, I've been studying the basics of the ARM assembly (and daydreaming about making a compiler which outputs it) and I can't help but notice that the mnemonic doing the bitwise OR operation in ARM ...
8 votes
0 answers
227 views

How does GADTs as in Haskell-like languages compare to indexed families in dependent types?

In Haskell, GADTs are only indexed by types, while indexed families in DT are mainly indexed by terms. With the presence of without-K, it is hard to refute cases just by unifying type terms, while in ...
7 votes
0 answers
387 views

What languages provide static guarantees about race conditions?

What programming languages provide significant static guarantees about race conditions (with respect to memory safety), and what guarantees do they provide? I am aware that Rust provides some ...
7 votes
0 answers
371 views

Are there languages having multiple level fine control over deep and shallow copy?

A reference or level-0 copy is the same object as the original, only accessed differently. A level-1 shallow copy is a new object, with every member a reference to the member under the same name in ...

15 30 50 per page