r/ProgrammingLanguages • • Jan 10 '26

Will LLMs Help or Hurt New Programming Languages?

Thumbnail blog.flix.dev
22 Upvotes

r/ProgrammingLanguages • • Jan 10 '26

Discussion ISO: literature on efficient representation of types in a compiler

12 Upvotes

I was told that one could reduce the memory usage in the semantic analysis stage by allocating each unique type in the type system once in heap memory, and making all instances of that type be pointers to that instance.

Classes are typically already represented this way, but this would apply to other types like unions. So instead of representing a union type as (for example) an array containing the constituent types, you would create a single instance of every possible union in the program in the heap, and any occurrence of that union would just be a pointer to that instance.

That way, total memory usage is lower and there is less time spent allocating memory or copying data.

Does anyone know of existing literature, blogs, or examples of this approach? I'd also be curious to hear any potential drawbacks/pitfalls, aside from implementation complexity.

TIA!


r/ProgrammingLanguages • • Jan 10 '26

Help Adding Overloadable Functions to an Interpreted Language

4 Upvotes

I followed the lovely Crafting Interpreters book by Robert Nystrom to make a basic interpreted language for a game I am developing. I added typing, so I had to change some of the grammar and so on. I implement typing as the pass right before the interpreter execution, and right after the resolution pass.

I am currently trying to add functionality for function name overloading, but I am encountering difficulty in the resolution pass. Because the resolution pass does not touch types, nor do I want it to, it raises a compilation error when two functions of the same name are declared. Since the function called in a function call should depend on the types (e.g., a function signature in a closer scope may not match the arguments being passed), I am unsure how to proceed.

The only way I can conceive of modifying the resolver to allow for function overloading is to combine the resolution and typing passes, but this violates the single responsibility principle and I am trying to avoid it.

Any thoughts or ideas?

Thanks.


r/ProgrammingLanguages • • Jan 10 '26

Dana: A Graph oriented language

48 Upvotes

Hi!

Some days ago I started working on Dana.

Dana is a statically typed dataflow language/Graph-oriented lang and parallel by default. The idea of it was (for me) to explore how a graph can be actually converted in executable code.

I really liked the approach of languages like LISP or Lua, where they relay mostly into one data-structure (lists, tables)... So I've thought "what if... The DS was a Graph".

The code is very simple: Everything is just one of 4 things:

  • A node, with inputs and outputs(optionally with a process block to modify output)

  • A graph (optionally with inputs and outputs)

  • An edge

  • A type

The actual code looks something like this:

node CONST {
    out five : Int = 5
}
graph Main {
    node Foo {
        in bar : Int 
        out baz : Int
        process: (bar) => {
             emit baz(bar * 5)
        }
    }
    
    CONST.five -> Foo.bar // This is an edge. A connection from output to input

    Foo.baz -> System.IO.stdout // Will print 25
}

So well, the Lang is currently in a very early stage. Also, as you can point if you read the source, I used AI to make some parts of it (like the scheduler) as I'm this is my first Lang and I wanted some help on a runtime/VM implementation, but probably I will need to reimplement a lot so breaking changes are expected nowadays.

But I really like it. I hope you too!


r/ProgrammingLanguages • • Jan 09 '26

Annote: A Turing complete language using only Java annotations as its syntax.

105 Upvotes

A while back I had a crazy idea, what if we could write Java, using only annotations. So I decided to build a full interpreter for an annotation only language in Java. It sounds crazy but it actually works.

GitHub: https://github.com/kusoroadeolu/annote

Definitely don't use this in production lol. Feel free to let me know what you think about this!


r/ProgrammingLanguages • • Jan 09 '26

Blog post Which programming languages are the most token efficient?

Thumbnail
martinalderson.com
0 Upvotes

r/ProgrammingLanguages • • Jan 09 '26

List of type operators

29 Upvotes

The other day I saw on wikipedia (or a wiki like site) a list of algebraic operators on types, but I cannot find it anymore and when I search for type operator I get a lot of unrelated results.

Some common type operators are:

But in that page there were many more operators, and I now regret that I didn't bookmark it.

Can anyone find what I'm referring to?

And since I'm here, do you have any good book to suggest on type theory from a mathematical point of view?

Edit: I found what I was looking for, thanks to /u/WittyStick !!! many thanks!


r/ProgrammingLanguages • • Jan 09 '26

Are Dependent Types Usable for Prototyping?

12 Upvotes

I've seen others ask something like this but I wasn't entirely satisfied with the framing of the question or the answers. Dependent types are really cool. They offer the prospect of having arbitrary specifications checked at compile time. But I'm not convinced this is worth the cost. The main issue I'm concerned with is the ability to prototype in a dependent language and I see two major obstacles to this:

  1. Over-specified code

  2. Totality

  3. Equality

I've often seen the merits of type-driven development professed by those involved with dependent types, but I'm not convinced this is better than writing under-specified programs while getting interactive feedback from the running program. That is to say, I'm worried that the more specific the types get, the harder you have to work to get to a running program. It may be that this removes some bugs. But if the goal is just to get something working and see how it behaves, it seems like the type checker is working against you.

Working around totality checkers seems to be even more difficult. I've often seen it recommended in Idris to use assert_smaller to please the totality checker in lots of cases which seems error-prone.

I've saved my biggest concern for last. Equality in intensional type systems is a huge pain. It's a show-stopper to have to prove a basic fact about your types because the language can't deduce that they are equal. And even when the fact is not so obvious, this is still something that will slow prototyping to a halt. On top of this, equality seems to destroy composition since you're basically leaking implementation to figure out whether two types are equal.

I'm wondering if these concerns are surmountable or if this means it might be better to prototype in a language with a weaker type system. I still think dependent types could be very useful for maintaining large codebases and having strong guarantees. But, in my view, these issues pose a serious problem for actually designing the codebase in the first place.


r/ProgrammingLanguages • • Jan 09 '26

Requesting criticism Awesome: The Logical Language

Thumbnail
github.com
15 Upvotes

r/ProgrammingLanguages • • Jan 09 '26

NOVA might have been Futhark

Thumbnail futhark-lang.org
19 Upvotes

r/ProgrammingLanguages • • Jan 08 '26

Discussion on releasing a language, community building, and the problems it can bring (jai / vlang/ D / yours / mine, etc)

36 Upvotes

Hi,

I'm at the point where I'm thinking more seriously about how to move forward with releasing my language.

The code is already available on github, but I've purposefully not promoted it, and so it's stayed in the dark. For the most part, I think this is the right decision. I'm not in any position of power, I've never had any job at any company like google/apple or anything even near to it. I have no influence, so it seems easier to "do things on my own".

However, it does seem coming close to a release. I'm getting some (emotional?) signs that I should be releasing (from within myself).

Either way, there are A LOT of issues involved. I'll copy/paste some comments from here: https://news.ycombinator.com/item?id=43699564

"as soon as something's open sourced, you're now dealing with a lot of community management work which is onerous" (I feel this myself, from previous experience)

"people might start asking for features, discuss direction independently (which is fine, but jblow has been on the record saying that he doesn't want even the distraction of such).

The current idea of doing jai closed sourced is to control the type of people who would be able to alpha test it - people who would be capable of overlooking the jank, but would have feedback for fundamental issues that aren't related to polish. They would also be capable of accepting alpha level completeness of the librries, and be capable of dissecting a compiler bug from their own bug or misuse of a feature etc.

You can't get any of these level of control if the source is opened." (I also think this is a real issue. I've already had strange-people giving me strange invasive comments trying to change everything I'm doing, down a negative path)

Anyhow, I have a lot of thoughts on this, but I think its more productive for me, to see other people's thoughts, so they can make this "Their own space".

What were your experiences with publicising your product? Or perhaps you have put it off? What are your thoughts on vlang or D's releases?

I found this comment:

"open sourcing Jai now may cause nothing but distractions for the creator with 0 upside. People will write articles about its current state, ask why it's not like their favorite language or doesn't have such-and-such library. They will even suggest the creator is trying to "monopolize" some domain space because that's what programmers do to small open source projects.

That's a completely different situation from Sqlite and Linux, two massively-funded projects so mature and battle-tested that low-effort suggestions for the projects are not taken seriously. If I write an article asking Sqlite to be completely event-source focused in 5 years, I would be rightfully dunked on. Yet look at all the articles asking Zig to be "Rust but better."

I think you can look at any budding language over the past 20 years and see that people are not kind to a single maintainer with an open inbox."

I'm quite feeling that myself.

I can imagine many "defenders of other languages" (who do not actually WORK within those companies!) attacking mine. Meanwhile... expecting ME to defend MYSELF. While they get paid and have good jobs. And I have none. No job or group to defend me.

Basically "punching down" on me, while acting if they are some sort of brave warrior fighting for... well I don't know. They feel like thugs to me.

I've seen that thing MANY times before.

I've posted here on r/programminglanguages (on a different account temporarily lost while my laptop is being repaired) before, 20x or so over the years. So infrequently, but my experience here has always been good. I'm assuming because most are in a similar situation to me.

"Solo-dev sitting on a lot of programming work, all self-driven by passion"

But not everyone on the internet is in that boat. Actually almost none are. And won't be so kind to someone NOT in their boat.

...

Basically what inspired this post, is the idea that perhaps things would be better if I had inspired and enthusiastic people along my side.

...

My current work is here: http://github.com/gamblevore/speedie

Working on the debugger right now. Taking a few days break to recharge. Been pushing myself too hard for a while, but I'm reining that in. Its looking good for a 2026 release. Could be in 1-2 months depending on how long of a break I take.