I had a similar thought process (but luckily without spending time implementing something). I want to write a game. I thought, "None of the current languages works quite the way I want. I know! I'll write a language specifically for my game and just keep implementing the bits I need". Then I thought, "Wait. If I do that, I'll spend 90% of my time writing a language and 10% of my time writing a game". So I was saved.…
One of my motivations for writing a compiler was to get my game Empire to run faster. Wound up with a career writing compilers, not games.
Sadly, I must say goodbye to Leaf, my programming language
111–120 of 132 posts
Re: Sadly, I must say goodbye to Leaf, my programming language
#112Earlier quoted context omitted.
Games are still in need of a better language. I have some skepticism and hope for Jai. I really wish D as better C worked better in that realm, but it's missing a few crucial things. Rust asserts too much control over memory. I'm all ears for anything that's somewhere between C and C++ as an alternative to write games in. Most new languages just don't get the things right that C++ did, which is why despite it having…
Here is a direction if you are all ears : instead of a new language, add a new layer. I tried creating my own languages before, some 15 years ago. While I had fun writing compilers, I missed a lot more writing actual programs. One day I suddenly realized I don't really need new language, what I needed is simply context dependent syntax and code block organization, which can easily implemented on the spot. It become M…
Re: Sadly, I must say goodbye to Leaf, my programming language
#113Earlier quoted context omitted.
Here is a direction if you are all ears : instead of a new language, add a new layer. I tried creating my own languages before, some 15 years ago. While I had fun writing compilers, I missed a lot more writing actual programs. One day I suddenly realized I don't really need new language, what I needed is simply context dependent syntax and code block organization, which can easily implemented on the spot. It become M…
How is MyDef not another language?
Here is a short example:
page: test, basic_frame
module: c
$local int A[3]
$for i=0:3
A[i] = i
$dump A[0], A[1], A[2]
Despite the look, if you know c, you recognize it as c. And as you get familiar, you see it exactly as C. `basic_frame` is merely a custom template so one doesn't have to always write the main function signature. $for is shorthand for `for-loop`, `$dump` is simply printf with simple type translations.Now that you had this meta layer, there is no limit on how you want to dress up your code. Examples:
$local A[3]: int
$sumcode(3) A[i]=i+3
$foreach A
$dump $(t)
or page: test, basic_frame
$call declare
$call init
$call report
subcode: declare
$local pn_A[3] = {1, 2, 3}
subcode: init
$foreach pn_A
$(t) = $(t)^2
subcode: report
$(set:print_to=stderr)
$foreach pn_A
$print "%d: %d", $(i), $(t)
There are lots of idioms and conventions, but it is not a problem as long as you recognize them only as clothing.Lastly, when dressing up the code makes little sense or you simply don't know better way of dressing them, you can simply write vanila C (or any languages that you are writing). MyDef never tried to compile your language.
Re: Sadly, I must say goodbye to Leaf, my programming language
#114Earlier quoted context omitted.
Here is a direction if you are all ears : instead of a new language, add a new layer. I tried creating my own languages before, some 15 years ago. While I had fun writing compilers, I missed a lot more writing actual programs. One day I suddenly realized I don't really need new language, what I needed is simply context dependent syntax and code block organization, which can easily implemented on the spot. It become M…
The problem is, your coworker need to modify the generated code.
Re: Sadly, I must say goodbye to Leaf, my programming language
#115Earlier quoted context omitted.
> Games are still in need of a better language. I find Swift to be the best so far, its strong ties to the Apple ecosystem notwithstanding. Having tinkered with various environments since the Sinclair Spectrum's BASIC (though back then I had no idea what I was doing) I've successively fallen in love with Visual Basic (6.0, not the .NET impostor) and then C#, and now I'm smitten with Swift. In Microsoft land I was let…
With UWP and .NET Native, .NET (C#/VB) is as first class as C++. To the point the Windows UI team does all their graphics demos in C#.
I’m too deeply entrenched in Swift though and disgusted by the sight of semicolons in a language anymore :P (maybe I’ll dip into VB.NET and see how it’s doing.)
Re: Sadly, I must say goodbye to Leaf, my programming language
#116I had a similar thought process (but luckily without spending time implementing something). I want to write a game. I thought, "None of the current languages works quite the way I want. I know! I'll write a language specifically for my game and just keep implementing the bits I need". Then I thought, "Wait. If I do that, I'll spend 90% of my time writing a language and 10% of my time writing a game". So I was saved.…
Games are still in need of a better language. I have some skepticism and hope for Jai. I really wish D as better C worked better in that realm, but it's missing a few crucial things. Rust asserts too much control over memory. I'm all ears for anything that's somewhere between C and C++ as an alternative to write games in. Most new languages just don't get the things right that C++ did, which is why despite it having…
If you want to write games, use your favorite language, and just START. All limitations can be circumvented somehow.
Re: Sadly, I must say goodbye to Leaf, my programming language
#117Earlier quoted context omitted.
I was almost like OP for a while. Working on game, fed up with existing languages (even C), wanted a better C. I was excited about Jai, but as time goes on I'm finding it looks less and less what I want from a language. Seriously considered making my own. Then I started working with Zig[0]. It's about 90% the language I want and even though it's still immature and the syntax, std lib, and semantics are in flux, I sti…
Zig is Linux-first, though. I don't think they have any dev who runs Windows. For games especially, you don't want Windows to be an afterthought. Maybe they'll get to it eventually, but it doesn't seem a priority.
Re: Sadly, I must say goodbye to Leaf, my programming language
#118Earlier quoted context omitted.
The AAA company I work for has tried everything possible to work around C++, and let me tell you, had they not started any such efforts, they'd have been way better off. Seeing the results of it all makes me super sceptical of any C++-killers.
Pure OOP is a poor fit for implementing games, but it's a fine base to build a entity-component-system layer on top of which is excellent for games.
Re: Sadly, I must say goodbye to Leaf, my programming language
#119Earlier quoted context omitted.
Games are still in need of a better language. I have some skepticism and hope for Jai. I really wish D as better C worked better in that realm, but it's missing a few crucial things. Rust asserts too much control over memory. I'm all ears for anything that's somewhere between C and C++ as an alternative to write games in. Most new languages just don't get the things right that C++ did, which is why despite it having…
I was almost like OP for a while. Working on game, fed up with existing languages (even C), wanted a better C. I was excited about Jai, but as time goes on I'm finding it looks less and less what I want from a language. Seriously considered making my own. Then I started working with Zig[0]. It's about 90% the language I want and even though it's still immature and the syntax, std lib, and semantics are in flux, I sti…
Re: Sadly, I must say goodbye to Leaf, my programming language
#120Earlier quoted context omitted.
Pure OOP is a poor fit for implementing games, but it's a fine base to build a entity-component-system layer on top of which is excellent for games.
C++ is not pure OOP. you can write functional stuff quite well. the more recent C++ standard you are willing/are able to adopt the better it gets ;) C++17 is quite awesome.
The only nagging point is the copy-paste compatibility with C. :\