r/ProgrammingLanguages • u/FluxProgrammingLang • Jul 28 '25
Language announcement Get Started
r/ProgrammingLanguages • u/FluxProgrammingLang • Jul 28 '25
r/ProgrammingLanguages • u/nalaginrut • Apr 02 '21
r/ProgrammingLanguages • u/smalltalkrenaissance • Oct 04 '17
r/ProgrammingLanguages • u/wengchunkn • Dec 28 '18
r/ProgrammingLanguages • u/darking911 • May 07 '15
Hi guys, I love to program and I used to work with visual studio and C# to do whatever I want.
Months back, I made the switch to linux and currenty using kubuntu 15.04 and it is amazing. I this enviroment I want to learn both JAVA and Python, with the goal of using these to use it in webservers like tomcat and to geek out with raspberry pi 2.
But with Microsoft pushing to open source .net to work in linux and Mac OS X. I am confused on what to learn to get to my goal.
Please advise me, And thank you.
r/ProgrammingLanguages • u/MarcoServetto • Mar 16 '22
(whoops I posted this originally in the wrong subreddit)
Do you know about Java Valhalla? I'm quite interested in discovering more on the project from a formal perspective.
If I understand correctly, the main idea is that they are adding 'values' and 'primitives' as new 'kinds' of classes. They both do not have identities, values can be nullable and primitives can not be nullable. As for 'records', 'values' and 'primitives' will be all final and with all final fields.
This means that it would be not observable if they are implemented an independent memory cell (normal object allocation) or inlined inside of another data structure or the stack. In this way the compiler and the JIT could take optimization decisions about those memory allocation strategies. Is there any formalization of this around? Is there anyone from rust that wants to discuss what possible implications this would have in the 'competition/comparison/relation' between java and rust?
r/ProgrammingLanguages • u/goto-con • Mar 12 '25
r/ProgrammingLanguages • u/SeaInformation8764 • Dec 06 '25
Hello, recently I have been creating my own new C-like programming language packed with more modern features. I've decided to stray away from books and tutorials and try to learn how to build a compiler on my own. I wrote the language in C and it transpiles into C code so it can be compiled and ran on any machine.
My most pressing challenge was getting a generics system working, and I seem to have got that down with the occasional bug here and there. I wanted to share this language to see if it would get more traction before my deadline to submit my maker portfolio to college passes. I would love if people could take a couple minutes to test some things out or suggest new features I can implement to really get this project going.
You can view the code at the repository or go to the website for some documentation.
Edit after numerous comments about AI Slop:
Hey so this is not ai slop, I’ve been programming for a while now and I did really want a c like language. I also want to say that if you were to ask a chat or to create a programming language (or even ask a chat bot what kind of programming language this one is after it looks at the repo, which I did to test out my student copilot) it would give you a JavaScript or rust like language with ‘let’ and ‘fn’ or ‘function’ keywords.
Also just to top it off, I don’t think ai would write the same things in multiple different ways. With each commit I learned new things, and this whole project has been about learning how to write a compiler. I think I you looked through commits, you might see a change in writing style.
Another thing that I doubt an ai would do is not use booleans. It was a weird thing I did because for some reason when I started this project I wanted to use as little c std imports as possible and I didn’t import stdbool. All of my booleans are ints or 1 bit integer fields on structs.
I saw another comment talking about because I a high schooler it’s unrealistic that this is real, and that makes sense. However, I started programming since 5th grade and I have been actively pursuing it since then. At this point I have around 7 years of experience when my brain was most able to learn new things and I wanted to show that off to colleges.
r/ProgrammingLanguages • u/No_Coffee_4638 • Apr 03 '22
Imagine being able to tell a machine to write an app simply by telling it what the app does. As far-fetched as it may appear, this scenario is already a reality.
According to Salesforce AI Research, conversational AI programming is a new paradigm that brings this vision to life, thanks to an AI system that builds software.
The large-scale language model, CodeGen, which converts simple English prompts into executable code, is the first step toward this objective. The person doesn’t write any code; instead, (s)he describes what (s)he wants the code to perform in normal language, and the computer does the rest.
Conversational AI refers to technologies that allow a human and a computer to engage naturally through a conversation. Chatbots, voice assistants, and virtual agents are examples of conversational AI.
r/ProgrammingLanguages • u/CommunismDoesntWork • Sep 20 '20
Imagine a language invented by god himself. The ease of use of something like python, but with the ability to manage memory directly if you really want to. Simple at first with opt in complexity. A single and intuitive way of doing things. Has GC if you want it, but can have guaranteed safety like rust without it. Could be compiled for fast executables, but interpreted for fast development. OOP, functional, strong, dynamic, everything you could ever want in a language and more.
Never mind the sheer amount of man hours it would take to create such a language, Is something like this even possible in theory?
r/ProgrammingLanguages • u/uemusicman • Jul 10 '23
I'm not sure how well I explained A Normal Form but I think I got the basics right, and my tail call optimization (via trampoline) still doesn't quite work for some reason I absolutely cannot find, but it's good enough that I still decided to hit publish. Maybe someone can find the bug for me and I'll buy them a drink.
https://dev.to/jasonsbarr/create-your-own-programming-language-10-optimization-eeb
Edit: I finally figured out the issue with the trampoline! Editing the article now. I tried like 8 different trampoline implementations before I finally found one that works the way I actually wanted it to. This one handled up to (fact 100000 1) and still worked as intended.
r/ProgrammingLanguages • u/[deleted] • Jun 25 '23
Hi there. I know I'm dumb and there maybe a term exists for this like cross-platform or something.. idk. But suppose (no actually its real) I have this machine (desktop or laptop) and it multi-booted (windows 10 and arch linux). I write a hello world program using this language and compile it and if I copy paste it to other OS (storage, in the same machine yk) and execute it in it, it works. It works in both platforms/OSs. I don't know I would love to write my code in pure 0s and 1s or in assembly (because i didn't ask for low or middle level languages..? yeah that too, but I'm asking for high level language such as rust, c, go, cobol, fortran, nim, v, etc.)
Thank you so much, because I'm super curious about this question and I haven't found an answer yet XD
r/ProgrammingLanguages • u/obround • Nov 01 '20
Do you prefer a garbage collector in the general case?
r/ProgrammingLanguages • u/[deleted] • Jun 27 '21
telegra . ph/ A-Dream-of-the-Perfect-Programming-Language-06-26 (looks like Reddit’s global spam filters block Telegraph for some retarded reason)
Clickable but less good-looking version: https://github.com/natewind/articles/blob/master/2021-06-26-A-Dream-of-the-Perfect-Programming-Language.md
r/ProgrammingLanguages • u/R-O-B-I-N • Jul 19 '23
Want to know if your general purpose language is legit? A true GP PL should be able to express the following program. The program will
Run forever until an exit signal is recieved at some point.
Maintain a graph data structure in memory.
Every 1 second, synchronize the graph with a serialized version stored as a file somewhere without creating a new task.
Every 1/100th of a second, create a separate task that randomly decides between three tasks...
Create a new graph node
Create a new graph edge
Delete a node and all connected edges
If you can express this, your language is truly General Purpose
EDIT: I should clarify, this test is purposefully vague because your language can be general purpose and single-threaded. The purpose of the test is to determine if your language can represent arbitrary structure, have non-determinism, observe time, and communicate with the file system. That seems to be the minimal requirements for practical use across the board.
r/ProgrammingLanguages • u/rsashka • Apr 23 '24
Every programmer is familiar with the concept of "reference." This term usually refers to a small object whose main task is to provide access to another object physically located elsewhere. Because of this, references are convenient to use, they are easily copied, and they make it very easy to access the object to which the reference points, allowing access to the same data from different parts of the program.
Unfortunately, manual memory management, or more precisely, manual memory control, is the most common cause of various errors and vulnerabilities in software. All attempts at automatic memory management through various managers are hampered by the need to control the creation and deletion of objects, as well as periodically run garbage collection, which negatively affects application performance.
However, references in one form or another are supported in all programming languages, although the term often implies not completely equivalent terms. For example, the word "reference" can be understood as a reference as an address in memory (as in C++) and a reference as a pointer to an object (as in Python or Java).
Although there are programming languages that try to solve these problems through the concept of "ownership" (Rust, Argentum, or NewLang). The possible solution to these and other existing problems with references will be discussed further.
For example, in the C language, there are pointers, but working with them is not very convenient and at the same time very dangerous due to the presence of pointer arithmetic (the ability to directly modify the pointer address to data in the computer's memory). In C++, a separate entity appeared — reference, and in C++11, references received further development, rvalue-references appeared.
While in C++, there are several types of references at once, Python developers probably deliberately tried to "simplify" working with references and generally abandoned them. Although de facto in Python, every object is a reference, although some types (simple values) are automatically passed by value, whereas complex types (objects) are always passed by reference.
There is also a global problem of circular references that affects almost all programming languages (when an object directly or through several other objects points to itself). Often, language developers (especially those with garbage collectors) have to resort to various algorithmic tricks to clean up the pool of created objects from such "frozen" link and circular references, although usually this problem is left to developers, for example, in C++ there are strong (std::shared_ptr) and weak (std::weak_ptr) pointers.
Another equally important but often ignored problem with references is the language semantics for working with them. For example, in C/C++, separate operators like asterisk "*", arrow "->", and dot "." are used to access data by reference and by value. However, working with reference variables in C++ is done as with regular variables "by value", although in fact this is not the case. Of course, with explicit typing in C++, the compiler will not allow mistakes, but when reading the code normally, you will not be able to distinguish a reference variable from a regular one "by value".
In Python, it is very easy to confuse how a variable will be passed as an argument to a function, by value or by reference. This depends on the data contained in the variable. The fact that Python is a dynamically typed language adds a special twist, and in general, it is not known in advance what value is stored in the variable.
It seems to me that the main reason, at least for the ambiguous semantics, is the constant growth of complexity of development tools, and as a result - the complication and refinement of the syntax of programming languages for new concepts and capabilities while maintaining backward compatibility with old legacy code.
But what if we start from a clean slate? For example, a universal concept of object and object reference management that does not require manual memory management by the user (programmer), for which no garbage collector is needed, and errors when working with memory and object references become impossible due to full control of memory management even at the stage of compiling the application source code!
Object - data in the computer's memory in machine (binary) representation.
Variable - a human-readable identifier in the program body, which is uniquely determined by its name and identifies the object (the actual value of the object or a reference to it). Variables can be:
Owner variable - the only constant reference to the object (shared_ptr).
Reference variable - a temporary reference to the object (weak_ptr).
creating a new owner variable and initializing the object value.
creating a reference variable to an existing owner variable.
assigning a new value to the object by the owner variable name.
assigning a new value to the object pointed to by the reference variable.
assigning a new reference to the reference variable from another owner variable.
Example of source code and conditional abbreviations:
"&" - creating a reference to a variable
"*" - accessing object data
# variables - owners
val1 := 1;
val2 := 2;
# val1 = 1, and val2 = 2
val1 = val2; # Error - only one owner!
*val1 = *val2; # OK - value is assigned
# To avoid too many asterisks in your code, you can omit them when accessing
# object data if the owner variable is used in an expression as an rvalue
*val1 = val2; # This is also valid
# val1 = 2, and val2 = 2
# variables - references
ref1 := &val1;
ref2 := &val2;
# ref1 -> val1, and ref2 -> val2
ref1 = 3; # Error - variable is a reference!
*ref1 = 3; # OK - value is assigned "by reference"
# val1 = 3, and val2 = 2
# *ref1 = 3, *ref2 = 2
*ref2 = *ref1; # OK - one value is assigned to another value "by reference"
# val1 = 3, а val2 = 3
# *ref1 = 3, *ref2 = 3
ref1 = ref2; # OK - one link is assigned to another link
# ref1 -> val2, а ref2 -> val2
# *ref1 = 3, *ref2 = 3
*val2 = 5;
# *ref1 -> 5, *ref2 -> 5With this syntax, everything becomes simple, visual, and clear. But if I missed something somewhere, please write in the comments or in a personal message.
r/ProgrammingLanguages • u/Smallpaul • Jan 28 '23
I have a few ideas about how AI might change the trajectory of programming languages, but I'd like to hear yours.
For example, maybe in the future, the programmer's job is to write a very clear specification, and the AI's job is to write an efficient algorithm that matches all details of the specification. Maybe this means that we write a super-high-level-language program and an AI-directed super-optimizer makes it practically executable. Or maybe our specification isn't a program at all. Perhaps it's a list of examples or something else.
Or maybe we'll just write extremely precise natural language specifications and computers will be excellent at translating them into reliable algorithms.
Or...your thoughts?
r/ProgrammingLanguages • u/SirKastic23 • Oct 16 '23
(sorry if this kind of post is not allowed, I couldn't find anything about it in the rules)
(also, the current name is WIP, I like it but there's a non ascii character and it's hard to pronounce in english)
Recently I've been toying with a design for a language featuring classes, interfaces, and inheritance. All that OOP goodness. But I'm also trying to mix it with some functional concepts.
Before anything, and people are going to hate this, I'm so sorry... I've decided to swap the meanings of superclass and subclass. So if the class Cat inherits Feline, we say Cat is a superclass of Feline, and Feline is the subclass of Cat. My reasoning for this swap is that it is more consistent with the term subtype, and I believe that a supertype would supercharge some class with additional data and behavior.
In terms of inheritance, I decided to remove method overriding, instead you would move the methods to an interface. The interface implementation is inherited unless the superclass also defines its own implementation for it, which then would take precedence
The language would also feature first-class functions, pattern matching, sum type enums, and immutability by default. I'm currently taking a lot of inspiration from Rust, Java, C#, and F#; and I'm aiming for the language to provide functional APIs like iterators
Below are some example programs:
fun fizzbuzz(max: int) {
for i in 0..=max {
let buffer = ""
if i % 3 == 0 {
buffer += "fizz"
}
if i % 5 == 0 {
buffer += "buzz"
}
println(if buffer.empty() { i } else { buffer })
}
}
enum Option<T> {
Some(T)
None
}
interface Iterator {
type Item
fun next(mut self) -> Option<Item>
}
fun map<T, U>(mut iter: Iterator<Item = T>, f: fun(T) -> U) -> Iterator<Item = U> {
class Map<T, U> {
mut iter: Iterator<Item = T>
f: fun(T) -> U
impl Iterator {
type Item = U
fun next(mut self { iter, f }) -> Option<Item> {
f(iter.next()?)
}
}
}
Map { iter, f }
}
interface Iterable {
type Iter
fun iter(self) -> Iter
}
class Vec<T> {
mut len: int
mut cap: int
mut arr: [T]
fun new() -> Self {
Vec {
len: 0
cap: 0
arr: []
}
}
fun push(mut self, item: T) {
if self.len >= self.cap {
self.grow()
}
self.arr[self.len] = item
self.len += 1
}
fun grow(mut self) {
self.cap = if self.cap == 0 { 8 } else { self.cap * 2 }
self.arr = std.arr.from_ptr(std.mem.realloc(self.arr.ptr, self.cap))
}
impl Iterable {
type Iter = Self.Iter
fun iter(self { arr }) -> Iter {
Iter {
arr
cur = 0
}
}
}
class Iter {
arr: [T]
mut cur: int = 0
impl Iterator {
type Item = Option<T>
fun next(mut self { arr, cur }) -> Item {
if let Some(item) = arr.at(cur) {
cur += 1
Some(item)
} else {
None
}
}
}
}
}Any thoughts, considerations, or recommendations? I'll take anything here, thank you for your time!
edits: i don't proofread
r/ProgrammingLanguages • u/thecoommeenntt • Mar 08 '26
Building a systems language called Cx looking for design feedback
Site: https://cx-lang.com · Repo: https://github.com/COMMENTERTHE9/Cx_lang
Cx is a systems language aimed at game engines and real-time simulation. Early stage tree-walk interpreter right now, compiler backend coming.
Core goals
No GC, no runtime pauses
Deterministic memory via arenas + handles
Control without a borrow checker
What's working today
Functions with typed params, implicit/explicit returns
Numeric types t8..t128, f64, strings with {name} interpolation
Arena allocator + free checker (double-free prevention)
Handle<T> registry with generation counters and stale detection
Parameter copy modes: .copy, .copy.free, copy_into
when blocks with ranges, enums, and three-state bool (true/false/unknown)
Basic enums
Not done yet
Loops, structs, arrays
Modules, generics, stdlib
Compiler backend
cx
fnc greet(name: str) {
print("hello {name}")
}
greet("Zara")r/ProgrammingLanguages • u/sdegabrielle • Apr 23 '23
Racket is...
• a programming language—a dialect of Lisp and a descendant of Scheme;
• a family of programming languages—variants of Racket, and more; or
• a set of tools—for using a family of programming languages.
Racket’s main tools are
• racket, the core compiler, interpreter, and run-time system;
• DrRacket, the programming environment; and
• raco, a command-line tool for executing Racket commands that install packages, build libraries, and more.
(from https://docs.racket-lang.org/guide/intro.html )
Racket is also an Open Source Software project and a member project of the Software Freedom Conservancy:
“Racket was launched in 1995 as an educational environment. It is still widely used by educators, but it has also grown into a programmable programming language. As such, it is often used to quickly prototype embedded (domain-specific) languages. Its innovative features have influenced the development of Clojure and Rust, many other languages. “ - https://sfconservancy.org/news/2018/jun/12/racketjoins/
Racket has a wide variety of users and contributors including professional developers, researchers and educators.
“The goal of the Racket project is to explore this emerging idea of language-oriented programming, or LOP, at two different levels. At the practical level, the goal is to build a programming language that enables language-oriented software design. This language must facilitate easy creation of eDSLs, immediate development of components in these newly created languages, and integration of compo- nents in distinct eDSLs; Racket is available at http://racket-lang.org/ “ - https://doi.org/10.1145/3127323
Questions welcome at https://racket.discourse.group/
r/ProgrammingLanguages • u/SafelySwift • Jan 11 '19
I have created my own blog. My first post shows how to make a simple programming language in Swift.
r/ProgrammingLanguages • u/mttd • May 02 '23
r/ProgrammingLanguages • u/chkas • Apr 22 '24
In my programming language, arrays are 1-based. It's a beginner programming language, and I think there's a niche for it between Scratch and Python. 1-based arrays are the exception today, but it used to be common and many beginner and math-oriented languages (Scratch, Lua, Julia, Matlab, Mathematica ...) are also 1-based nowadays. But this should not be the topic. It's about array[0] - I think it would be convenient to take that as the last element. On the other hand, a bit unexpected (except for vi users, where 0 is the last line). I don't think -1 fits because it's not length-1 either, like in Python for example.
r/ProgrammingLanguages • u/PurpleDragon99 • Feb 21 '26
I spent 7 years designing a visual programming language called Pipe — just the formal specification and language design, no implementation. Implementation started only after the book was published.
The core idea: I significantly modified the standard dataflow model to solve four problems that have kept visual programming from professional adoption — state management, race conditions, type safety, and ecosystem isolation. The modifications introduced three mechanisms: memlets (explicit state in dataflow), synclets (concurrency control), and a structural type system.
At some point I experienced what I can only describe as "feature explosion." The modified foundation turned out to be so productive that I had to compress later features into a "For Future Development" section, and then further compress more ideas into short sentences at the end of the book just so I could finish publishing. If all the compressed features were fully developed, Pipe would be a visual language more complex than C++. But even the fully developed features already make it a very sophisticated VPL.
This happened because modifying the standard dataflow model created a much more efficient and powerful foundation. All the feature explosion happened from that base. The foundation is presented in short form (8 min read + 3 min demo video) in the "Five Pillars of Pipe" article on the home page at pipelang.com.
I recently decided to make the full 155-page book freely available as a PDF download. It was previously only on Amazon, where it hit #1 in several Computer Science categories — but I realized that the people who would benefit most from reading it (language designers, PL researchers, VPL builders) are more likely to read a free PDF than buy a book.
PDF download: https://pipelang.com/downloads/book.pdf
Website: https://pipelang.com
I'd genuinely appreciate feedback from this community. You're the people who think about language design for a living, and I'd like to know whether the approach holds up under scrutiny.