Jonathan Blow (Braid) is making a new programming language for game development

This is the 3rd part of a (so far) 3-part video series, wherein Jonathan Blow details his annoyances with the status quo in game programming. In this last part, he demos a new programming language, specifically designed for game development.

Pretty heavy stuff for someone who’s not a language nut (which rules me out), but figured some of the heavyweights may find it interesting:

I watched the first video a few weeks ago. They are each pretty long (like 2 hours) but very informative. From what I remember he wants it to be similar to c/c++ (as that it was the gaming industry is based around), but fixing a lot of ‘problems’ that it has, now now that we have 30 years of experience with it. He also slates garbage collection languages, saying they don’t perform as well.

From the Reddit thread:

Some highlights:
4m56s - Demo start
20m10s - testproc() implementation. flow control, defer, recursion, static and dynamic arrays.
33m25s - invaders(). Simple space invaders implementation.
38m6s - printf() checking via custom compile time checks.
43m54s - Compile time program execution.
45m27s - Compile time invaders().
55m12s - Compile time verification of statically declared game data.
1h3m45s - Compile time program dependency generation.
1h7m55s - Custom preprocessor.
1h11m58s - Glimpse at bytecode.
1h19m19s - Quick linux demo to show it works on more than just Windows.

Also some key features:

- Compiles to C - A bytecode interpreter can execute the whole language

The big feature here is compile time execution:

  • The compiler resolves dependencies between functions
  • Can return values from compiled time executed code
  • Execute any function from the same crate as long as it does not depend on the function you are calling from
  • Type check a function without having to declare a new construct, but keep the same syntax
  • Fast iterative cycle between coding and compile time improvements

I wonder how well it will scale to BIG projects. I do not have time to go in detail through the video right now, but things I wonder about are:

  1. How ‘no header files’ and ‘compiles to C’ is going to work with idea of libraries/modularization? Or it is not possible to do compiled libraries in this new language and you need to fall back to C/C++?
  2. How incremental compilation works versus global dependency checks? If I modify single definition in one file, it can completely change the context of how other files should be compiled. Does it mean that each time I touch anything, EVERYTHING has to be re-parsed, recompiled and relinked? Without IDE keeping it all in-memory and doing advanced dependency ‘dirtying’, it is going to be painful…
  3. Single namespace for everything? He already tripped on that in bit of demo I have seen (“ooh, no compilation error because I have global variable called ‘a’ in different file, so I can assign to it instead of having an error of undefined local variable”).
  4. Cannot spot anything regarding inheritance, visibility scoping, polymophism etc ? Is it a C replacement, rather than C++ replacement?

I won’t mention IDE support (smart code completion, hotswap etc), because I understand it is early stage, so tools are not yet ready.

As far as cross-platform is mentioned. I think that problem with cross-platform is a lot more about DirectX versus OpenGL and fopen versus completion ports, rather than Linux command line versus Windows VS env (or even x86 versus x64 versus ARM). Not sure how this language is going to help here.