🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

What do you think about JAI

Started by
20 comments, last by Promit 5 years, 12 months ago

Since 2015 i am following jonathan blow´s stream about making a programming language for games called "JAI".

I think it has a lot of potential and it may suit even non-game related programs.

 

The syntax is very clean and the language/compiler has great features like:

 

- Compile time execution

- Support for SOA in structures

- "defer" for releasing memory when out of scope (in reverse order)

- No need for any external make-tools, because using compile time execution the application can build itself

- "Using" keyword for accessing members from a instance directly (Similar to the "with" keyword from object pascal, but with more flexibility and without the need for enclosing scope)

- No need for any header files

- Good scope handling

- Built-in type information for almost any type for run and compile time

- Code generation

- Support for optional type inference, even for member fields

- Manually uninitialized (--- keyword)

- No garbage collection, full control over memory

- Very fast compile time

- Polymorphism: ad-hoc, parametric and subtyping (Subtyping is still experimental) + stuff i have seen before

- Multiple return values (automatic tuples)

- Many more

 

Unfortunatly its not out yet, but its on a good way.

 

What do you think about that? I personally want it right now - so i can drop C/C++ entirely.

 

If you want more details, see this inofficial documentation:

https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md

Advertisement

Unfortunately it's lacking a lot of stuff which most programmers want. It's fascinating that one of the statements in the Jai Primer is "Automatic memory management is a non-starter for game programmers who need direct control over their memory layouts" when it's increasingly clear that game programmers are demanding that level of control less and less often. Unreal and Unity are garbage collected!

I'm sure Jonathan will be very productive with it, and it has many good aspects, but I don't see it ever seeing serious use by more than a double-digit number of developers.

1 hour ago, Kylotan said:

Unfortunately it's lacking a lot of stuff which most programmers want.

Which is - except from missing garbage collection?

Smart pointers and automatic memory management in general. I think C and C++ are pretty much the only major languages that force manual memory management on the user. Even Rust, which has the user manually allocate memory, can still automatically free it for you.

Exceptions are another. Return codes are not ideal.

And polymorphism. It's not entirely clear to me whether Jai has polymorphism since the writing on it is unclear, and one example seems to rebrand function overloading as polymorphism, but object polymorphism is a useful tool that most game developers use in some way.

I also can't find out if there's any sane way of handling Unicode, or whether there's a useful standard library included. It's difficult to talk very meaningfully about the language when most of the information is locked up in very long videos.

44 minutes ago, Kylotan said:

Smart pointers and automatic memory management in general. I think C and C++ are pretty much the only major languages that force manual memory management on the user. Even Rust, which has the user manually allocate memory, can still automatically free it for you.

Exceptions are another. Return codes are not ideal.

And polymorphism. It's not entirely clear to me whether Jai has polymorphism since the writing on it is unclear, and one example seems to rebrand function overloading as polymorphism, but object polymorphism is a useful tool that most game developers use in some way.

I also can't find out if there's any sane way of handling Unicode, or whether there's a useful standard library included. It's difficult to talk very meaningfully about the language when most of the information is locked up in very long videos.

From what i have seen and i have seen a lot:

- It has the ability to automatic clean up memory as well, "defer" - when its manually allocated. But you can free it directly using "delete" in the same way you can do in C++. Also there are some sort of smart-pointers built-in without the smart-pointers part (hiding the actual data type).

- For exceptions, i dont miss them. I have them everyday in the business world and i would love to use error codes and multiple return values instead

- There are ad-hoc, parametric and subtyping polymorphism (Subtyping is still a part, which is not full nailed down yet)

- String types are UTF-8

 

But you are right, its hard to talk about features when there are no official informations out yet - but all features i have listed i have actually seen them in his videos.

 

I will update the feature-list :D

Wake me up when it actually ships.

Wait. JAI is a replacement for C, not C++. At least based on a video that I saw. So if we're comparing JAI to only C, then does all of @Kylotan's critique still hold?

 

Beginner in Game Development?  Read here. And read here.

 

C++ is also a replacement for C and it already exists. I don't think it's worthwhile looking at any language in a vacuum where other alternatives are ignored.

This has come up periodically in the GDNet forums. My opinions are essentially unchanged since the last time this thread happened.

Jai may well represent the pinnacle of productive programming languages for Jon Blow, I don't know and I frankly couldn't care less. I'm not Jon Blow and I don't like his style. I will not adopt Jai personally.

Merits (or lack thereof) of the actual language aside, I have a strong problem with Blow's personality and attitudes towards other programmers, and I find a lot of what he says in the videos (and elsewhere) distasteful. To me this just compounds the problem of trying to learn more about the actual project. In the end, I think it's easier to just leave it all alone.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

On 9/20/2017 at 9:29 AM, ApochPiQ said:

This has come up periodically in the GDNet forums. My opinions are essentially unchanged since the last time this thread happened.

Jai may well represent the pinnacle of productive programming languages for Jon Blow, I don't know and I frankly couldn't care less. I'm not Jon Blow and I don't like his style. I will not adopt Jai personally.

Merits (or lack thereof) of the actual language aside, I have a strong problem with Blow's personality and attitudes towards other programmers, and I find a lot of what he says in the videos (and elsewhere) distasteful. To me this just compounds the problem of trying to learn more about the actual project. In the end, I think it's easier to just leave it all alone.

I'm not that familiar with the things he's said that are objectionable.  Can you post some links?

i have mostly seen him from his videos working on JAI and he seems like a pretty reasonable person... at least in those.   From what I've seen of the language, there's a lot there that's really nice and well thought out.  Stuff I wouldnt mind using if it were available.  Sure, the language would necessitate a change of mindset from C++, but that's not necessarily a bad thing.

This topic is closed to new replies.

Advertisement