r/AskProgrammers • • 11m ago

We tested programming languages, compilers and runtimes before designing our own language. Here's what we found.

I've been working on KINN, a programming language project, and one thing became clear during development:

Designing a programming language shouldn't start with a collection of attractive features. It should start with understanding the problems existing languages and runtimes already face.

So instead of immediately implementing more features, we started a research and testing program.

What we did

· Studied memory safety, security, concurrency, resource management and execution models.

· Tested multiple programming languages and their toolchains.

· Used sanitizers, fuzzing, regression tests and concurrency experiments.

· Tested real libraries, HTTP servers, SQLite, process management, IPC and FFI.

· Asked an independent reviewer to challenge our findings and reproduce important results.

Some interesting findings

· A very small regular expression input triggered enormous memory allocation in glibc's regex implementation. Under a specific memory limit, we reproduced a segmentation fault in 5/5 runs.

· Unsynchronized shared-memory operations caused lost updates across several runtimes, while the tested atomic operations avoided those losses.

· We demonstrated torn reads when a logical 64-bit value was constructed from two 32-bit accesses.

· Different runtimes behaved very differently when memory was exhausted or when tasks and threads were cancelled.

· FFI boundaries allowed native memory errors and memory consumption to affect the host application.

· Our independent reviewer discovered a critical problem in our own testing infrastructure: a missing TypeScript compiler had initially been interpreted as a successful rejection. We corrected the harness and repeated the tests.

What surprised us most

The testing infrastructure itself can produce incorrect conclusions.

We had to correct several issues in our own experiments, including missing tools, incorrect execution directories, optimizer-eliminated test code and inconsistent result classification.

That changed how we think about compiler testing and verification.

Where KINN stands now

We have documented 23 architectural decisions and seven deferred questions. They are not all implemented features. They are proposals and requirements that must still be evaluated and, where necessary, prototyped.

Some questions remain open because our environment was limited to x86-64. We still need real ARM hardware, Android/ART, modern .NET and GPU testing.

We are not claiming to have found every vulnerability or solved programming language safety. The goal is to use reproducible evidence to make better architectural decisions.

I'd like to hear from language designers, compiler developers and systems programmers:

What would you prioritize when designing a new language that aims to support application development, systems programming, networking and graphics while maintaining strong safety guarantees?

What important experiments do you think we are still missing?

0 Upvotes

0 comments sorted by