Unanswered Questions
38 questions with no upvoted or accepted answers
18
votes
0
answers
579
views
What impact do type sigils have on programmers?
Some languages, such as BASIC (STRING$), Perl ($scalar, @array, ...
13
votes
0
answers
321
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
403
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
717
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 ...
11
votes
0
answers
440
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 ...
11
votes
0
answers
291
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
286
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 ...
9
votes
0
answers
271
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
206
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,...
9
votes
0
answers
140
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 ...
8
votes
0
answers
283
views
What are some of the challenges in implementing, and disadvantages of having, dependent types in a programming language?
I know about some of the potential advantages and the desirable features of Agda/Coq/F*/Idris2, etc. But what about the other side of things? For example, there seems to have been talk for years about ...
8
votes
0
answers
183
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
317
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
324
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 ...
7
votes
2
answers
512
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 ...