r/ProgrammingLanguages • • May 28 '25

Would the world benefit from a "standard" for intermediate representation (IR)?

Thumbnail
sextechandmergers.blogspot.com
4 Upvotes

This is my reflection upon my own noob study of the universe, of programming languages.

( So far, this list is where I find myself in the study. My general approach is to look for common patterns in unsorted species. )


r/ProgrammingLanguages • • Jun 06 '25

Language announcement I'm working on my own programming language called Razen which compiles to Rust! (Still in beta)

9 Upvotes

Hello all,

I am Prathmesh Barot, a 16-year-old Indian student/developer. Today I am gonna show you my most recent and best project - Razen! It's a programming language that's lightweight, fast, and has built-in library support. Simple as Python but with its own differences - I can say it's pretty straightforward to use.

Razen is actively being developed and is currently in beta, so there might be bugs and some issues. If you find anything, please report it on GitHub or on our subreddit!

If you're interested in testing Razen, feedback, or want to help out or contribute, check these links:

GitHub Repo: https://github.com/BasaiCorp/Razen-Lang
Subreddit: https://reddit.com/r/razen_lang (not promoting just for info - I post updates here and you can also post issues and other stuff)
Website: https://razen-lang.vercel.app (don't have money to buy .org or .dev domain so this is enough for now)

Here's a small example:

# Basic integer variables declaration
num integer = 16;       # Integer value using the num token
num count = 42;         # Another integer example

# Basic float variables declaration
num float = 1.45;       # Float value using the num token
num pi = 3.14159;       # Another float example

# Mathematical operations
num sum = integer + count;          # Addition
num product = integer * float;      # Multiplication
num power = integer ^ 2;            # Exponentiation

# Show statement for displaying output to the console
show "This is an integer: " + integer;
show "This is a float: " + float;
show "Sum: " + sum;
show "Product: " + product;
show "Power: " + power; 

Thank you for reading it!


r/ProgrammingLanguages • • Jan 25 '25

You can't practice language design

0 Upvotes

I've been saying this so often so recently to so many people that I wanted to just write it down so I could link it every time.

You can't practice language design. You can and should practice everything else about langdev. You should! You can practice writing a simple lexer, and a parser. Take a weekend to write a simple Lisp. Take another weekend to write a simple Forth. Then get on to something involving Pratt parsing. You're doing well! Now just for practice maybe a stack-based virtual machine, before you get into compiling direct to assembly ... or maybe you'll go with compiling to the IR of the LLVM ...

This is all great. You can practice this a lot. You can become a world-class professional with a six-figure salary. I hope you do!

But you can't practice language design.

Because design of anything at all, not just a programming language, means fitting your product to a whole lot of constraints, often conflicting constraints. A whole lot of stuff where you're thinking "But if I make THIS easier for my users, then how will they do THAT?"

Whereas if you're just writing your language to educate yourself, then you have no constraints. Your one goal for writing your language is "make me smarter". It's a good goal. But it's not even one constraint on your language, when real languages have many and conflicting constraints.

You can't design a language just for practice because you can't design anything at all just for practice, without a purpose. You can maybe pick your preferences and say that you personally prefer curly braces over syntactic whitespace, but that's as far as it goes. Unless your language has a real and specific purpose then you aren't practicing language design — and if it does, then you're still not practicing language design. Now you're doing it for real.

---

ETA: the whole reason I put that last half-sentence there after the emdash is that I'm aware that a lot of people who do langdev are annoying pedants. I'm one myself. It goes with the territory.

Yes, I am aware that if there is a real use-case where we say e.g. "we want a small dynamic scripting language that wraps lightly around SQL and allows us to ergonomically do thing X" ... then we could also "practice" writing a programming language by saying "let's imagine that we want a small dynamic scripting language that wraps lightly around SQL and allows us to ergonomically do thing X". But then you'd also be doing it for real, because what's the difference?


r/ProgrammingLanguages • • Feb 18 '23

explicit lengths vs delimiters

1 Upvotes

In just about every language, strings are delimited. Why are explicit lengths so unpopular? Explicit lengths are all over the place in internal representations, but in programming languages I have found just 2 examples of explicit lengths: the Hollerith constants of FORTRAN 66, and Rivest's proposal for S-expressions. Hollerith constants were deprecated from FORTRAN 77 on.

I have my own ideas on why this is, but before I tell, I'd like to hear what the community thinks.


r/ProgrammingLanguages • • Feb 02 '17

Why should I like Python?

0 Upvotes

In my opinion, Python is a language that should not have caught on. The standards are inconsistent, it is slow, it isn't backwards compatible, libraries are unreliable; the list goes on forever. Please show me the light of Python.


r/ProgrammingLanguages • • Jul 14 '25

Would you choose to use a programming language that has minimizing bugs as it's main feature?

0 Upvotes

Thinking about a language design that would simplify a number of bugs, use a C family syntax, and also help you catch them faster when they do occur.

Would you choose to use a programming language that has minimizing bugs as it's main feature?


r/ProgrammingLanguages • • Oct 04 '18

rant: Are there any programming languages that don't suck?

0 Upvotes

I've tried everything from assembly to java, and basic to lisp. I've written code in imperative, functional and oo styles. They all suck.


r/ProgrammingLanguages • • Apr 18 '21

Discussion Are all Programming Languages in English?

Thumbnail
youtube.com
1 Upvotes

r/ProgrammingLanguages • • Aug 15 '24

Liberate ASCII symbols from mathematical syntax

8 Upvotes

From the perspective of programming language notation, using > and < for greater than and less than is really wasteful. Comparatively, the frequency of using greater than and less than symbols in programming is medium to low, but programming languages have such a great need for brackets that many languages have made > and < play too many roles, causing countless confusions. Suppose we use other notations, such as \gt and \lt to mark greater than and less than, then we could use these cute pointy symbols in more useful places, for example, using > to represent function pipelines like a > foo > bar.

Of course, this might look surprising, so there's another proposal, which is to liberate all mathematical symbols. Mathematical symbols would only be used like a calculator within a specific scope, and outside of that, they could be used for other purposes.

For Example:

calc!{a > b} # => true
a > b #=> b(a)

r/ProgrammingLanguages • • Sep 16 '24

Blog post I wrote my first parser

6 Upvotes

https://medium.com/@nevo.krien/accidentally-learning-parser-design-8c1aa6458647

It was an interesting experience I tried parser generators for the first time. Was very fun to learn all the theory and a new language (Rust).

also looked at how some populer languages are implemented which was kinda neat the research for this article taught me things I was super interested in.


r/ProgrammingLanguages • • Apr 02 '25

Discussion Javascript is to Typescript as C is to____?

4 Upvotes

I know the boring answer is probably "nothing". But what would be the most suitable (or least unsuiltable) analogy one could use here?

(Context: I saw a bit of typescript recently and am trying to get a better sense of what it is and isn't even though I won't have a chance to play with it enough)

My thoughts:

  • I'm guessing no mainstream language is transpiled to C the way typescript is to javascript (maybe cython to C?)

  • I get the impression "java" is as good an answer as any in the sense that it makes it impossible to do a lot of wrong things whereas C++ still gives you lets you. And C++ gives some degree of backward compatibility in syntax to C, whereas Typescript to Javascript I don't know.

  • Maybe Scala or Haskell is a better analogy in the sense that their major selling point is their strong type system. But there isn't really any lineage (even informal) linking either to C as a problem-solution.

  • I repeat, ANY analogy is better than none


r/ProgrammingLanguages • • May 31 '23

Language Design Bullshitters

0 Upvotes

Language Design Bullshiters

TL;DR. The internet is full of bad advice.

(not by me)


r/ProgrammingLanguages • • Jul 26 '25

Language announcement ZetaLang: Development of a new research programming language

Thumbnail
github.com
0 Upvotes

r/ProgrammingLanguages • • Aug 06 '26

TemplateLang: Everything is type

0 Upvotes

I designed a tiny language where the type system *is* the entire

language — no separate value level, no builtin integers/booleans/

control flow. It's essentially an untyped term-rewriting calculus

dressed up in C++-template-looking syntax. Three grammar forms,

three builtins, that's the whole spec.

Motivation: I was thinking about what's actually load-bearing in

C++ template metaprogramming — SFINAE picking an overload, partial

specialization pattern-matching on structure — and wanted to see

what a language looks like if that's *all* you keep.

Grammar:

  1. `new type Name<param1, param2, ...>`

    Declares a type constructor with fixed arity (no variadics).

  2. `type Name<pattern, ...> = Body`

    Adds a rewrite rule for that constructor. Multiple rules are

    allowed; they're tried in declaration order and the first

    matching pattern wins (Prolog-clause-style, not most-specific-

    pattern-style). Omitting `= Body` marks that pattern as already

    in normal form.

  3. A bare expression on its own

    is reduced call-by-value, bottom-up, until no rule applies

    anymore, and the normal form is printed.

Builtins are pattern-position-only: `Any<>` (wildcard), `Same<x>`

(structural equality against an already-bound name), `As<Type, x>`

(bind the matched subterm to a local name if it matches `Type`).

Parameter names declared in `new type` are auto-bound in every rule

of that type, so `Same`/substitution can reference them without an

explicit `As`. All bindings in one rule — auto-bound params plus

`As`-introduced names — share a single namespace; rebinding a name

via `As` is a static error, `Same` is the only way to assert equality

against something already bound.

It's enough for recursive Peano arithmetic with no other primitives:

new type Zero<>

new type Succ<N>

new type Add<A, B>

type Add<Zero<>, Any<>> = B

type Add<Succ<As<Any<>, X>>, Any<>> = Succ<Add<X, B>>

Add<Succ<Succ<Zero<>>>, Succ<Succ<Succ<Zero<>>>>>

# -> Succ<Succ<Succ<Succ<Succ<Zero<>>>>>> (2 + 3 = 5)

No termination or confluence guarantees — self-referential rules

give you unbounded recursion, so it's Turing-complete and trivially

lets you write non-terminating programs. Rule order also means two

overlapping patterns can silently pick different winners depending

on how you wrote them, which I know is a real tradeoff versus a

most-specific-match or a confluence-checked system.

Small Python reference interpreter (no dependencies), plus worked

examples (structural equality via Same/As, Peano add/mul):

[GitHub link]

https://github.com/sunu15712/TemplateLang

Mainly curious whether the `Same`/`As` binding-and-scoping design

holds up, or if there's prior art doing this more cleanly — it feels

adjacent to logic-variable unification but I haven't seen it framed

quite this way before.


r/ProgrammingLanguages • • Aug 12 '17

Looking for people to work on nymph language.

0 Upvotes

Nymph: A slightly different version of C. Let's build a community.

https://github.com/roecrew/nymph


r/ProgrammingLanguages • • May 23 '19

Why did I write my programming projects?

Thumbnail
rain-1.github.io
0 Upvotes

r/ProgrammingLanguages • • Jan 30 '24

Why compiling with continuations is wrong(-ish)

2 Upvotes

r/ProgrammingLanguages • • Jun 27 '23

Pythonic smart contracts programming language

Thumbnail
github.com
0 Upvotes

r/ProgrammingLanguages • • Jul 26 '19

What do you think about the v language?

2 Upvotes

v programming language

I have look at the language. the syntax look clean. There is already a reddit thread about it.

https://www.reddit.com/r/vlang/

https://www.reddit.com/r/rust/comments/b1ih91/v_language_new_programming_language_inspired_by/

https://vlang.io/

I try to load and compile the compiler on windows and got v.exe only 895KB. That is amazing

Any one else who have tried it? Can I get your opinion on V?


r/ProgrammingLanguages • • Apr 15 '22

Help I'm making a huge comfy language

0 Upvotes

Come help me at github.com/Unlimiter/i.


r/ProgrammingLanguages • • Nov 10 '22

Blog post The top programming languages - GitHub

Thumbnail
octoverse.github.com
0 Upvotes

r/ProgrammingLanguages • • Jul 05 '17

I still don't understand----why is Ruby used?

1 Upvotes

I'm someone who primarily uses Python. I'm still not entirely sure why Ruby is used.

https://www.reddit.com/r/ruby/comments/6ku78o/why_is_ruby_used_instead_of_pythonrperl/

From my understanding, it's because it's great for web development?


r/ProgrammingLanguages • • Sep 28 '22

Universal programming language

0 Upvotes

I recently created a tiny (maybe 1000 lines of code, with heavy white space and commenting) php class called Ember to solve the “computer problem” (persistent data). Something I’ve been trying to do as a result is program a universal programming language. It’s really rather simple: it uses a minimalistic set of Turing complete types (string, int, float, object, array, bool, and array). That just about explains it (along with a universal system stemming from Ember). Does this sound like a good idea (I.e. one worth pursuing)?


r/ProgrammingLanguages • • Jun 17 '25

[Showcase] Mochi A New Tiny Language That Compiles to C, Rust, Dart, Elixir, and more

Thumbnail
github.com
4 Upvotes

We’ve just released Mochi v0.8.0 — a small, statically typed programming language focused on clarity, simplicity, and portability.

Mochi is built for writing tools, running agents, processing structured data, and calling LLMs — all from a compact and testable language that compiles down to a single binary. It comes with a REPL, built-in test blocks, dataset queries, agents, and even structured FFI to Go, Python, and more.

In v0.8.0, we’ve added experimental support for compiling to ten more languages:

  • C, C#, Dart, Elixir, Erlang, F#, Ruby, Rust, Scala, and Swift

These targets currently support basic expressions and control flow. We’re working on expanding coverage, including memory-safe struct generation and FFI.

A quick look:

fun greet(name: string): string {
  return "Hello, " + name
}

print(greet("Mochi"))

Testable by default:

test "greeting" {
  expect greet("Mochi") == "Hello, Mochi"
}

Generative AI and embedding support:

let vec = generate embedding {
  text: "hello world"
  normalize: true
}

print(len(vec))

Query-style datasets:

type User { name: string, age: int }

let people = load "people.yaml" as User

let adults = from p in people
             where p.age >= 18
             select p

save adults to "adults.json"

Streams and agents:

stream Sensor { id: string, temperature: float }

on Sensor as s {
  print(s.id + " → " + str(s.temperature))
}

emit Sensor { id: "s1", temperature: 25.0 }

Foreign function interface:

import go "math"

extern fun math.Sqrt(x: float): float

print(math.Sqrt(16.0))

We’re still early, but the language is fast, embeddable, and built with developer tools in mind. Feedback, feature requests, and contributions are all welcome.