Jump to content

Support for multiple programming languages


Texenox

Recommended Posts

I know, I know. It would take a while for this to be implemented fully, I just want to see if you guys are on board with it.

It would be nice for programmers specializing in different Java-based programming languages to have Forge work under different programming languages. I don't mean the completely different ones like Python or C, but the ones based on Java, like Groovy or Deesel. We already have Scala, after all!

 

I don't suggest we do this RIGHT NOW, but I just wanted to put it out as a suggestion.

Link to comment
Share on other sites

Why?

Adding scala support in my opinion was a bad idea and has caused me nothing but issues.

However, there is nothing stopping YOU from writing whatever code you want in whatever language you want. As long as it runs ont he jvm and can survive the obfuscation it doesn't matter to us.

We are forced to add additional support for scala cuz it does some hackary making it a pain. But you could easily just write your main mod class in java and the rest in whatever language you want. We don't care.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

We are forced to add additional support for scala cuz it does some hackary making it a pain.

Could you please tell in short what hackery did you need to support besides different layout of main mod class? AFAIK two main problems with Scala when interoping with Java are raw Java types and companion objects instead of static data members.

Link to comment
Share on other sites

Take a look at the ILanguageAdapter, or rather the ScalaAdapter inner class. It has pretty good explanation on what's going on.

Thanks, I've checked them.

Per what I've seen there, there's nothing unusual - language adaptor for Scala actually just handles Scala's companion objects. In theory, any mod developer could circumvent this by using pure Java class for mod entry point.

That's why I've asked if Forge workarounds some other Scala-specific things.

There's no necessity, I'm just curious.

Link to comment
Share on other sites

Because cpw decided to officially support scala, which means that we had to officially support scala entry point. Hence the annoying adaptor.

If we officially support anything else we'll have to write a wrapper for it because the modders will think that things can be PURE that language.

It's mainly just a pain in the rear.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.