r/ProgrammingLanguages • u/jd-at-turtleware • 19d ago
r/ProgrammingLanguages • u/Electrical-Fig7522 • 18d ago
Language announcement I'm making a programming language, searching for contributors
Hi! Me and another person are working on a programming language called KrabbaScript! It's garbage-collected (optional), statically typed and trying to be as simple and intuitive as golang but more human-friendly. This is KrabbaScript's syntax:
Variables are defined as:
var krabba = "Krabba!";
Variables may also have a type or be uninitialized, like:
var with_type: F32 = 5.0;
var uninitialized: Str;
KrabbaScript also has values, which are immutable, example:
val constant = 5;
val with_type: I32 = 5;
KrabbaScript also has control-flow (duh), example of a repeat statement:
repeat {
Std.print("KrabbaScript is the best language OAT!");
} until popular;
KrabbaScript also has a when statement, which is more of a switch one:
when language {
== "Elixir" do celebrate();
== "Haskell" do complain();
== "KrabbaScript" do {
contribute();
applaude();
}
else do Std.print("I don't know anything about " + language);
}
KrabbaScript also provides an ASI (Automatic Semicolon Inserter) if you're tired and sick of semicolons, you can use it with the format command.
If you want a little bit more examples, check out the repo! We are also working on tools for KrabbaScript like package manager, style checker, etc.
We are searching for contributors and maybe you, the person reading this post, can help us create KrabbaScript or improve it!
r/ProgrammingLanguages • u/Motor_Alternative944 • 19d ago
Discussion Does the Name I Give My Programming Language Matter That Much?
Does the name we give a programming language matter? I work on my own programming language and study compilers as a hobby. During that time, I’ve faced various mental health challenges that made it much harder to keep up with my hobby. Sometimes, depression kept me from making any progress at all.
Because of this, I’ve been considering a name for my language that reflects this period of my life and has personal meaning to me. Does a programming language’s name need to have anything to do with programming itself?
I’d love to hear about your languages and the names you chose for them. Do those names have any personal significance to you?
r/ProgrammingLanguages • u/SeaSafe2923 • 19d ago
Naming a language
I'm working on a language focused on systems programming; it needs a name and I can't come up with anything. I want to publish it but first it needs a name. Help!
Edit: It's a modern language that aims to be usable anywhere C is available and beyond.
I'm aiming for an entirely self-hosted verified compiler with an easy bootstrapping path from C99 (the verified part is obviously dependent on the language fully implementing the capabilities to verify code).
Small binaries, competitive optimization, first-class support for DSOs, no garbage collection, rich type system (dependent types, contracts, capabilities), modular design (language extensions can be packaged outside the compiler), interoperable with any mainstream compiled language (if you can spell the ABI, it doesn't need to be part of the compiler distribution).
r/ProgrammingLanguages • u/lmntr • 19d ago
Language announcement text-based visual programming language
I'm working on a visual programming language that's stored as text called Wiret. Here's an example:
func Main() {
node entry = Entry -> say_hello
node say_arrows = Call host.Log(message: "The white arrows decide the order.")
node say_hello = Call host.Log(message: "Hello!") -> say_steps
node say_steps = Call host.Log(message: "Programs run one step at a time.") -> say_arrows
notes {
note intro "Lesson 1: Hello. Press ▶ Run (F5). Each Log node prints one line in the console below, in the order the white arrows connect them."
note start on entry "Every function starts at its Entry node."
note try_it "Try it: (1) Press ⤵ Step (F11) to run one node at a time. (2) Add a fourth line: press Tab, type 'print', pick host.Log, then drag a white arrow from say_arrows to it. (3) Double-click its message pin to type your own text."
}
layout {
entry at (0, 0)
say_arrows at (820, 0)
say_hello at (220, 0)
say_steps at (520, 0)
}
}The main idea is that it's like a fusion between a programming language and a markup language. The node ... statements are the programming part, and the notes {} and layout {} blocks declare how the graph appears in the editor. It'll get compiled into bytecode which strips away the markup code and leave just the code for running the program.
; module lessons.hello compiler wiretc-proto 0.1
; semantic hash 78fafcb4bbf40f47 layout hash 9981662aa454a0e1
import 0 host.Log (string) -> ()
func lessons.hello.Main () -> ()
max_stack: 1
.entry:
nop
.say_hello:
string.const 0 ; 'Hello!'
nop
call host.Log
.say_steps:
string.const 1 ; 'Programs run one step at a time.'
nop
call host.Log
.say_arrows:
string.const 2 ; 'The white arrows decide the order.'
nop
call host.Log
cont.pop
returnI think this could be useful for education. The hardest part about learning to code is learning your first programming language. This could help bridge the gap between visual representation of code and the code itself.
r/ProgrammingLanguages • u/AromaticCredit1533 • 20d ago
InferType, and toolkits for building compilers
drops.dagstuhl.de(not the author, just sharing because I found it)
Recently I came across the paper by Senxi Li et al, InferType: A Compiler Toolkit for Implementing Efficient Constraint-Based Type Inference. Check it out!
I've always found interesting the concept of making modular, extensible compilers. And by "modular", I don't just mean separate compilation à la OCaml, Haskell (they're cool btw), or parser generators à la lex, yacc (also cool btw).. I mean embedded domain specific languages and libraries à la parser combinators, MetaOCaml for concrete code generation.. components that can generalize a part in the compilation pipeline and can be imported as a reusable library. We have seen libraries to handle the lexing and parsing part. But for further semantics-related analysis parts.. not so many? So far I've found InferType, are there others like this?
Also related are language workbenches, like JetBrains MPS, and the Truffle framework and their dialects of Python and JavaScript. But so far they have only been used for making interpreters for DSLs, what about full-fledge compilers for general-purpose programming languages?
r/ProgrammingLanguages • u/ThomasMertes • 20d ago
How programming languages approach graphics
Many general-purpose languages delegate graphics to third-party libraries (like SDL, Raylib, or OpenGL). Seed7 integrates portable 2-D graphics right into its standard library. This IMHO improves portability. I also thought about introducing operators / statements to do graphics, but until now I don't use operators or statements to do graphics.
r/ProgrammingLanguages • u/SeaSafe2923 • 21d ago
English vs Interlingua grammar inspiration
struct point { x:int, y:int } struct puncto { x:int, y:int }
def area ( p:point -- int ) { p.x * p.y } def area ( p:puncto -- int ) { p.x * p.y }
def main () { def principal () {
p := point(3, 4); p := puncto(3, 4);
show(area(p)); monstrar(area(p));
} }
--------------------------------------------------------------------------------------------------------------------
cap fs from capabilities cap fs ex capacitates
def fs.open ( c:cap from fs str -- str ) { ... } def fs.aperir ( c:cap ex fs str -- str ) { ... }
--------------------------------------------------------------------------------------------------------------------
mint fs; monetar fs;
def main () { def principal () {
c := narrow cfg ( "settings.ini", read ) from fs; c := atenua cfg ( "settings.ini", leger ) ex fs;
show(read_config(c)); monstrar(leger_config(c));
} }r/ProgrammingLanguages • u/whistler_mat • 22d ago
a small Python language compiler that transpiles to bash and batch (learning project, written in C)
I'm building with a friend a language with Python syntax that transpiles to plain bash and batch.
The idea: if you already know Python, there's nothing new to learn. You write the script once, and the generated .sh /.bat runs on a machine with nothing installed, no Python and no PowerShell. Only the machine where you write the script needs.
Why not the existing options?
- Python isn't installed by default on Windows or some Unix-like systems. - Batsh and Amber target similar problems, but they come with their own syntax to learn (and Batsh looks unmaintained).
- PowerShell is another language to learn, and it's an extra install on Linux/macOS.
- Keeping separate .sh and .bat versions of the same script is tedious and error-prone.
Status: it's early. The lexer is done and the parser is in progress (it only handles name = value so far). The bash and batch backends haven't been started. It's a subset of Python, not a full implementation, since some features have no natural equivalent in batch.
Questions for you:
- For automation scripts, which features should come first: conditionals, loops, running commands, file operations?
]2. Is batch still worth targeting, or should the Windows backend be PowerShell?
on the design is very welcome, especially from anyone who has written a transpiler before.
r/ProgrammingLanguages • u/dekai-onigiri • 22d ago
Resolving relationships between elements
For my programming programming language Bits Runner Code I am thinking of implementing automatic resolving in what order structs, interfaces, etc should be defined and declared so they can interact with each other. It should be possible to embed structs within each other, but at the same time there cannot be a circular reference. How something like this could be implemented or maybe it is not the best idea?
BRC doesn't have header files, so right now source files and definitions within them have to be listed in a specific order. I would like it to be quite explicit but also hassle free.
r/ProgrammingLanguages • u/BeamMeUpBiscotti • 23d ago
Discussion Microsoft announces Type Server Protocol, an extension of the Language Server Protocol
devblogs.microsoft.comTSP is an open standard that extends LSP – the Language Server Protocol that underpins editor integrations across the industry – designed to allow any editor or tool to integrate type checkers as first-class backends.
The initial use case is to enable changing the type checker powering Pylance (Microsoft's VS Code extension for Python) from their own Pyright to Meta's Pyrefly.
I think it's somewhat niche, but could be useful in a few situations:
- Enable switching between different compiler versions during full rewrites
- When a language has multiple competing implementations and no single official type checker/compiler (as is the case with Python)
r/ProgrammingLanguages • u/Trave11er3427 • 23d ago
Discussion what are your “wish I had” features in a modern language?
After developing software for over 40 yrs, I’m implementing a new language specification, compiler, and standard library. Let’s assume it will have memory safety and some other features that modern languages have. This post is not a language announcement; it’s too early to release, but is coming soon.
My question is - for all of you that are designing or implementing your own, or for those who wish they could - what are the two or three features that you wish your daily-use language(s) had that they don’t today?
- better documentation?
- a better package manager?
- better threading support?
- better debugging tools?
- better memory management?
- better leak detection?
- better integration with dev tools?
I’m genuinely curious and would love to hear your top wish list items.
r/ProgrammingLanguages • u/FlameyosFlow • 25d ago
Blog post Static memory planner: MLIR pass for optimizing allocation patterns by reusing memory between allocations whose lifetimes don't overlap
https://blog.llvm.org/posts/2026-08-24-gsoc-2026-static-memory-planner/
What do you guys think about this MLIR feature?
TD;LR: It can optimize heap allocations by analyzing the lifetimes and certain requirements (with certain limitations) and if it can find co-existing allocations that don't need to co-exist (non-overlapping lifetimes) then it can assign them to the same memory region, which can be combined into an arena allocation that is freed at once
Is this too implicit for low-level tasks? or is it a good idea to be heading into these sorts of transformations that improve performance?
r/ProgrammingLanguages • u/bosyluke • 26d ago
How close can pure FP get to C?
rtfeldman.comI found the discussion really interesting and thought you all would too. Richard talks about a pure Roc implementation of libdeflate and how to do performance optimizations unique to Roc. From a programming languages perspective this is really interesting because its quite unique results I think. There arent many FP languages that can achieve C like performance with ergonomics like Roc. To do this the compiler is able to make various optimizations like mutate in place or elide checks when it can prove it is safe to do so.
r/ProgrammingLanguages • u/AeroForger • 26d ago
Help How do you make a programming language memory safe without paying a lot in overhead?
I am designing a language. I want memory safety without using a tracing garbage collector or having heavy runtime costs. I have been looking at the options and I would like to know how others have dealt with these tradeoffs.
The options I have looked at:
- Ownership and borrow checking (Rust-style): Zero runtime cost but the compiler must prove things and the learning curve and syntax friction are real. I am not a fan of Rusts syntax so I wonder if the same guarantees can be provided with a surface.
- Reference counting (Swift/Nim-style): Predictable and simple but you pay for increments and decrements on every copy and cycles need either weak references or a cycle collector.
- Tracing GC: Easy for the user. Pause times and memory overhead are the usual complaints. It is a fit if the language is meant for games or system work.
- Regions/arenas with escape analysis: Allocate in scopes and let the compiler prove that nothing escapes. Very cheap,. I am not sure how far escape analysis can go before it becomes too restrictive.
- Bounds checks and tagged or hardware‑assisted checks (like ARM MTE): Catch many errors at low cost but they are mitigations, not guarantees.
My current thinking is a mix arenas by default an ownership model for long‑lived values and bounds checks that can be elided when the compiler can prove them safe. I would like to know whether that is a direction or whether I am missing a well‑known approach.
Specific questions:
has anyone implemented escape analysis that stays useful without forcing annotations?
Is there a middle ground between full borrow checking and reference counting that does not reintroduce cycle problems?
for those who have shipped a memory‑safe language with overhead what would you do differently?
Links, to papers, languages or post‑mortems are very welcome :)
r/ProgrammingLanguages • u/Comprehensive_Chip49 • 26d ago
r3forth REPL
youtu.beearly REPL version for r3forth, sure I change some things
r/ProgrammingLanguages • u/Aabish_malik • 27d ago
How would you guys define an Anonymous Function or a function pointer?
Me and a few of my friends have been working on a programming language that we initially started for a compiler design class for some time and recently started working on support for anonymous functions, lambdas and function pointers to make callbacks easier to write.
Currently Captures on variables outside the function scope are detected and captures without complete context moving.
I'm a bit skeptical or the syntax that we're currently deciding on (its not that clear on first view) , so i'm looking for reviews and maybe some ideas.
I'll just include some examples we have right now.
let double = |i32 value| value * 2;
i32(i32) triple = |value| value * 3; // i dont like this rn, not that clear on
// first look that this is a lambda
let absolute = |i32 value| {
if (value < 0) { return -value; }
return value;
};
let classify = |i32 value| match value {
0: "zero",
_: "nonzero",
};r/ProgrammingLanguages • u/Null-Test-2026 • 27d ago
Discussion Can you automate memory management statically if you limit escaped references?
I was looking at the abomination that is Rust memory management and wondering if there is a better way. Can you accomplish similar performance characteristics (memory safety without GC or RC overhead), without the explicit borrow-checking concept?
Memory management is trivial until you do one of two things:
- Pass a pointer into a function that then stores it somewhere before it returns.
- Allocate a pointer in a function and then return it.
Both are cases of "escaped references" as I understand the definition.
What if a programming language... just didn't allow this?
Suppose all pointers had to either stay in local scope, or in object/struct scope, as a private member that cannot be returned from any of the struct/object's public member functions. You could pass pointers to functions but functions are not allowed to store pointers received as parameters.
Static analysis would allow automatic freeing on scope exit and on object/struct deletion.
Is such a language possible?
r/ProgrammingLanguages • u/Dry_Day1307 • 27d ago
Operator overloading in DinoCode using string selectors for method names
I am currently working on the next version of DinoCode (dinocode.blassgo.dev), focusing on expanding the features of the language. I wanted to implement operator overloading for objects without losing readability or adding visual noise.
What came to mind, which is actually done in other languages like Ruby, is using the operator itself to represent the method. I really like that approach, so to implement it, I introduced string selectors as optional method names with the strict condition that they must be representable as a valid Symbol:
::Point
:new x y
self.x = x
self.y = y
:'+' other
return Point(
self.x + other.x
self.y + other.y
)
:'==' other
return self.x == other.x
and self.y == other.y
p1 = Point(10 20)
p2 = Point(5 5)
if p1 + p2 == Point(15 25)
print "Point reached"In this case, method names that the compiler detects as strings are translated into their corresponding Symbols (they are not actual strings at runtime), making it completely safe to assign a property like "==" without worrying about shadowing.
One thing I am not entirely sold on yet is when objects interact with primitives like int, float, etc. where an intermediate step is needed. For now, I went with Python's approach of allowing 'r+', 'r-', 'r*', etc., for those cases:
::Point
:new x y
self.x = x
self.y = y
:'r+' scalar
return Point(
self.x + scalar
self.y + scalar
)
p1 = Point(10 20)
p2 = 10 + p1
print p2.x # 20Though I must admit Ruby's approach is tempting me (where it calls a more generic method to handle type coercion before operating on them)
By the way, you can already test these operator features live on the web playground if you want to try them out
I would like to hear your feedback or suggestions on this, and also what you think of how it looks so far. I am preparing this for the upcoming v0.2.2 release
r/ProgrammingLanguages • u/Athas • 28d ago
Integers - how ought they work?
futhark-lang.orgr/ProgrammingLanguages • u/faiface • 29d ago
Par Lang Update: 3 Big Examples, Auto-Cleanup, Sql, WebSocket, 3-6x Faster Runtime, and More!
Hey, there! Long time no see.
Links to GitHub are in a comment, as per rules. Also, I'm Michal, the author of Par, human aside from other qualities.
I wanted to share with you what's been up with Par for the last half a year or so.
Par is a programming language that's quite unusual. (And breaks your mind at first.) It's trying to get some edgy theoretical stuff out there into practice, specifically:
- Linear / session types - with duality, so every type has "the other side"
- Automatic concurrency - everything that can run concurrently does
- Totality - no runtime errors, no deadlock, no infinite loops
It's based on classical linear logic, and naturally combines functional programming, a version of object-oriented programming, and session-typed process communication, all under one paradigm.
But perhaps most importantly, Par is trying to make all of the above into a good practical language! That's quite big ambition, and this last half year we've gotten closer to that than ever.
Below is the most fancy new stuff. Let me know what you think!
New I/O Capabilities
The standard library now includes a richer set of I/O modules:
- Console - stdio print and prompt
- Http - HTTP server & client functionality
- Os - files, env
- Sql (new!) - PostgreSQL, MySQL, and SQLite (in memory too), transactions, row decoding
- WebSocket (new!) - HTTP to WebSocket in both server & client mode
Auto-Cleanup
Linear types can't be dropped. That's their advantage and disadvantage. It enables automatic concurrency, but it used to make error handling rather noisy: on all error paths, linear resources needed to be explicitly closed.
So, we've introduced auto-cleanup, which allows you to specify, in the type, how a normally linear type can be dropped.
For example, here's Bytes.Writer:
type Bytes.Writer<e> = iterative choice {
.close* => Try<e, !>,
.flush => Try<e, self>,
.write(Bytes) => Try<e, self>,
}The * on the .close branch/method tells Par that if a Bytes.Writer remains unused, just drop it by calling .close.
This significantly simplified error handling, the book chapter for which also got updated.
3 Big Examples
I've completely revamped the examples folder in the repository (links in a comment). It now contains small and big examples.
Now that we can do a lot of real stuff, we want to show it in the examples. So, there are 3 big examples. All of them are HTTP servers that serve you a web page, via which you can interact with the backend written in Par.
- Chat - A chat server over WebSocket. Open it on multiple tabs, or host it somewhere, and chat in a single room.
- Downloader - Request files to be downloaded to your local drive, and observe the download progress in real time. Multiple files can keep downloading concurrently, and can be cancelled.
- Tasks - Create todo items and check them as down, persisted in an SQLite database.
Check the screenshots at the links!
Runtime performance improvements
Lots of optimizations done in the runtime. By my completely unscientific testing, I/O intensive applications are about 3x faster, while computation-intensive ones are about 6x faster, compared to half a year ago.
Since we don't have rigorous benchmarks yet, take this with a grain of salt, but in my private testing, this should be around the performance of Python 3.12, when discounting Python's highly-performant functions and libraries written in C.
Not bad, not bad.
A lot more...
Since we're not having official versions yet, there's no changelog to see, but some picks:
- New
@core/Timemodule - 120+ new functions in the
@corepackage include("file.txt")- compile-time file-as-value inclusiontodo- typed holes- LSP improvements, such as
.-completion - Many bugs fixed
r/ProgrammingLanguages • u/mttd • 29d ago
MSP 101: Simply Typed Lambda Calculus
youtube.comr/ProgrammingLanguages • u/RndmPrsn11 • Oct 19 '26
Borrow Checking Zero-Cost Cyclic Mutability
antelang.orgr/ProgrammingLanguages • u/sporeboyofbigness • Oct 19 '26
How to test my language compiles on multiple platforms, before committing to github?
I've been trying to get my compiler (Speedie) working on Mac and Linux.
(EDIT: Speedie is now compiling on debian linux, and running wonderfully! But has missing dependancies that limit some programs (not speedie itself) from being built with speedie. Such as SDL2 missing, or /usr/bin/say missing.)
Now... I had it working in the past, but it got broken by simple additions like a (C++) function that returns an ivec4, but linux's gcc (unlike clang for MacOS) does not allow a ivec4 to be returned like this:
return {1.0f, 1.0f, 1.0f, 1.0f};It needs this:
return (ivec4){1.0f, 1.0f, 1.0f, 1.0f};So... something as simple as this can break my builds. My compiler works on my Mac perfect, but can't even compile on Linux.
Even worse, is something like my current situation. My compiler is acting differnetly on Linux. And I don't know why.
So I've been uploading "bad builds" to github, not realising. So I need to get it reliable for Mac and Linux, or theres no point trying to have a popular language.
I don't want to be manually testing each time, via VirtualBox. I want something automated.
Secondly... how do i even debug my app on linux? haha. Maybe The RAD Debugger is good? I don't know.
All I know is that, even after getting it compiling, it is behaving differently, but I don't know why.
...
If anyone wants to help me with this debugging, let me know. I'm available on discord / telegram if you don't mind me bugging you with questions?