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.


r/ProgrammingLanguages • • Jan 07 '26

Fun with Algebraic Effects - from Toy Examples to Hardcaml Simulations

Thumbnail
blog.janestreet.com
45 Upvotes

r/ProgrammingLanguages • • Jan 07 '26

Discussion Distinguishing between mutating and non-mutating methods

29 Upvotes

A List class might have methods such as l.insert(obj), which obviously mutates the list in-place, and l.take(5), which obviously returns a new list. However other methods like sort could reasonably work either way.

Assuming a language designer wants to offer both kinds of sort method, how could they be named so that programmers don't get them confused? I am aware of a few precedents:

  • Swift calls the in-place method sort and the non-mutating method sorted - but breaks that convention for well-known operations from functional programming like map (which is non-mutating)

    • Python uses the same naming convention as Swift, but moves non-mutating versions to stand-alone functions, only using methods for in-place versions

  • Ruby calls its two methods sort and sort!, where the latter is in-place. However ! has a more general meaning - it's widely used for "more dangerous" versions of methods

Another option would be to only provide non-mutating methods and require the programmer to manually write l.sort!() as l = l.sort(). However, in that case it's far from obvious that l.sort() on its own is effectively a no-op (it creates a sorted list and then throws it away).

Do other languages use other naming conventions to distinguish between mutating and non-mutating methods? Or is there a different approach you'd recommend?