Newest Questions
949 questions
-4
votes
1
answer
184
views
Is there any reason for a program to use "untyped" objects? [closed]
In this language I'm designing, there's the integer, floating-point, and object types. Most objects are created using a special kind of JSON notation. Because integers, fps, and objects are of ...
6
votes
5
answers
3k
views
What are the consequences of allowing breaking/returning from every statement?
One beneficial feature of Rust is that loop, the unconditional looping statement, allows so-called "returning break", ...
0
votes
0
answers
111
views
Object type definition from JSON - CFG design
In a "managed memory" language that I'm designing, I'm constructing grammar for the description of arbitrary object type that can simultaneously be used for initialization of objects with ...
4
votes
0
answers
203
views
Prior Art on implementing memory arenas or thread- or work-package-local allocators in systems programming languages
Local allocators can be beneficial in situations where tracking memory usage or releasing all allocated memory without running destructors at the end of an activity is possible. From that perspective, ...
1
vote
2
answers
309
views
Is it worthy caching third party libraries's sources into a header for saving type-checking-time?
In a specific language's build system (or package manager), checking third party sources (whether local or from a package registry) can be done in different ways.
NPM forces libraries to transpile TS/...
3
votes
1
answer
232
views
What are the pros and cons of dominator Phis vs predecessor Phis?
Phi nodes join data flow based on incoming control flow edges.
Determination of incoming control flow can be encoded either by directly listing predecessors or by listing blocks dominating ...
7
votes
4
answers
772
views
What makes a language "golfy"?
For those not in the know, a golfing language is a language designed such that its programs can be written with as few bytes as possible.
With that in mind, what metric, what objective, do language ...
4
votes
1
answer
287
views
Why are there different typeclass hierarchies?
What's the history and reasoning behind the differences in the typeclass hierarchies in various functional programming language standard libraries? For instance, why does ...
9
votes
1
answer
310
views
How to compile to preemptive coroutines?
I am interested in the concept of stackful coroutines, as how it is used by the developer in a language.
I have learned that Erlang and Go (perhaps some other languages) does have preemptive ...
0
votes
2
answers
1k
views
“return(x);” vs. “return x;”
In most C-like languages, a call such as printf("%d", x) is followed by two parentheses; and I see that a statement such as ...
3
votes
2
answers
123
views
Representing states/references more elegantly in a reactive-UI collaborative language [closed]
In my language, for its official implementation, I'm planning to support an approach like React.js's one, which, I admit, looks more cryptic than approaches like (.NET XAML)/(Adobe MXML) if code ...
1
vote
1
answer
299
views
How to design a grammar for a closely binding null-coalescing operator?
I'm prototyping a language that is memory safe by managing all pointers (details irrelevant here).
I want to have a null-coalescing operator with high precedence, it should bind more closely than ...
34
votes
6
answers
6k
views
Why do most languages have a complete operator precedence?
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 ...
0
votes
1
answer
243
views
What are type variables, metavars and base types?
As a follow-up to How should I read type system notation? (since it doesn't give depth on that)
Type variables
An algorithm I'm trying to understand uses the $\alpha$ and $\beta$ symbols to denote ...
6
votes
0
answers
135
views
What algorithms/approaches are known for type inference with subtyping (i.e. semiunification) of non-Turing-complete languages?
What are some options for integrating subtyping with Damas-Hindley-Milner inference? gets into this tangentially at the end of Jon Purdy's post ("Placing various restrictions on recursion (...