Skip to main content

Unanswered Questions

51 questions with no upvoted or accepted answers
13 votes
0 answers
141 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
862 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
339 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
481 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
325 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 ...
11 votes
0 answers
484 views

Why was && chosen as rvalue reference in C++?

I am NOT asking what && means. Does anyone know the history of why the symbol && was chosen? I can give some ...
10 votes
1 answer
385 views

What are some examples of languages singularly for creating UI's?

I'm looking for examples of DSL's created for UI layout and appearance. There are lots of libraries/frameworks for defining UI's, like SwiftUI and Flutter, but I'm struggling to find actual languages. ...
10 votes
0 answers
149 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
296 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
2 answers
691 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
283 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
219 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
151 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 ...
8 votes
0 answers
331 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
208 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 ...

15 30 50 per page