Programming Language for Games, part 3

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Sat Nov 1 10:17:42 PDT 2014


Am 01.11.2014 um 12:31 schrieb bearophile:
> Third part of the "A Programming Language for Games", by Jonathan Blow:
> https://www.youtube.com/watch?v=UTqZNujQOlA
>
> Discussions:
> http://www.reddit.com/r/programming/comments/2kxi89/jonathan_blow_a_programming_language_for_games/
>
>
> His language seems to disallow comparisons of different types:
>
> void main() {
>      int x = 10;
>      assert(x == 10.0); // Refused.
> }
>
>
> I like the part about compile-time tests for printf:
> http://youtu.be/UTqZNujQOlA?t=38m6s
>
> The same strategy is used to validate game data statically:
> http://youtu.be/UTqZNujQOlA?t=55m12s
>
> A screenshot for the printf case:
> http://oi57.tinypic.com/2m5b680.jpg
>
> He writes a function that is called to verify at compile-time the
> arguments of another function. This does the same I am asking for a
> "static precondition", but it has some disadvantages and advantages. One
> advantage is that the testing function doesn't need to be in the same
> module as the function, unlike static enums. So you can have the
> function compiled (separated compilation). Perhaps it's time for DIP.
>
> Bye,
> bearophile

Just started watched the beginning, will watch the rest later.

I find interesting that he also bases part of the language in how the ML 
languages look like.

So it seems that being C like is out for language design, as most modern 
languages are following ML like grammars.

Another trend, which I find positive, is how many people are now 
(finally!) assuming that C widespread into the industry was after all 
not that good, in terms of bugs/line of code.

Now we need another 30 years until D, Rust, Swift, Nim, <place language 
name here>, get to replace C and C++.


--
Paulo


More information about the Digitalmars-d mailing list