I think Sponge needs a scripting language

I’d vote for Python or Lua. Or you could just support Java and create plugins that support whatever language that suits your fancy.

Guandor, ports are official if they are created by the original author(s) lol

I said not it is impossibble,
But it is not elegant.

I am also a fan of python :wink:

Btw. Python, Ruby, php developed to be more than a script language!.

Its possible for Lua compatibility to be added to Sponge if its really wanted by the community however I wouldn’t be nagging the developers at this stage for this to happen.

I really need to learn Java.

1 Like

I feel like skript did a wonderful job at making simple plugins a lot easier.
There is a trade off, the more things u can do with a language, the more specific it has to be and the more specific a language is the harder it is to learn.
skript struck a balance between easy to read and use and functionality.
and in a sense all languages can be converted to somewhat readable code (pseudocode) but we are not using them because it would

  1. Make coding a lot slower
    ex. event.getPlayer().teleport(event.getPlayer().getLocation().add(0,0,1)); would become: on Event: Teleport Player to Players Location plus 1 on z axis. or something
  2. disagreement caused by oversimplification of the language. Different people have different ways of denoting the same thing and that would cause disagreement amongst people.
  3. its hard to put it into sponge (sponge would basically have to do the same thing as Skript and get a parser)

Is there any reason why you couldn’t use Scala or Groovy, which are much much easier than Java and still retain most of its functionality, without passing through a pseudocode plugin?

A scripting language or script language is a programming language that supports scripts, programs written for a special run-time environment that can interpret (rather than compile)

Don’t get why people think ruby/python aren’t scripting.

Huh? Example?

Depends on definition, JAVA has Rhino/Nashorn, is it a script language?

  1. Untyped: Scripting languages have no compiler, that is an advantage and disadvantage,
    e.g. what happen on API changes? Who define the API?
  2. Performance: javabytecode and machinecode is faster
  3. Memory management (I aggree not a valid argument in comparison to JAVA)
  4. Debugging is harder

No. Sponge does not need its own language. Who wants to learn an entire other language they’re never going to use anywhere else, let alone make it? Not me. Java is flexible and pretty easy, it doesn’t take much to learn it. But if Skript is ever ported over, feel free to use that.

Why does this even need to be implemented by sponge?

You can also do that with a plugin…I dont think that there are many limitations, e.g. when you use Groovy with Bukkit, you can almost copy & paste your java code, it will just work fine.

I’m not agree. Sponge doesn’t require a built-in scripting engine.
Here is example of very powerful scripting engine for bukkit - VarScript. JavaScript, Python, Groovy (and you can choose another scripting languages) and… only 1000 downloads. I think there’s no reason to implement into sponge such unpopular features

Any type of multi-language support is simply going to bloat the API. Just let plugins handle this type of thing. There is no reason to include it.

I like the Discourse^^
Should not be part of the API:

Actually, Scripting Languages may need its own thing, as its a very meta topic, and could provide back-end work API-side to be feasible.

That being said, Minecraft itself has no support for it. Its coded in Java, and all API’s intuitively are as well. @Dan200 made a mod called ComputerCraft that has its own interpreter for LUA though, which proves that its possible via a mod/plugin built upon an API though.

1 Like

Guys, I see that most of you reply without reading the other comments and the common opinion is that this feature would be unneccesary and I respect that.

There a few things I’d like to mention.

1-I never suggested to replace Java. I just wanted an alternative.
2-Java is not “that” easy. You think it’s easy because you already know it and you know the main logic of programming. However, for somebody who doesn’t even know what “compile” means, it takes a very long time to program a large plug-in.
3-Although Skript’s main motto is to program simple plugins, I have never needed (almost) any other plug-ins since I discovered Skript. For example, I can replace all Essentials commands with Skript and that’s a great opportunity for beginners to customize their servers.

Anyway, I thought that if this was build-in, scripting would be much more powerful but it seems that you guys don’t agree. :slight_smile:

2 Likes

I don’t actually disagree. I think the point of contention is whether it belongs as a part of Sponge. I see no reason it couldn’t be a plugin itself, and you’d be fine. Everyone wins.

1 Like

I agree with you,

I can see your point but everything would be handled by THAT plugin before the servers sees it eventually that could become a big blockade. I think there should be a built in language instead as an option since it is an API then why can’t part of it be functioning for another language? Coming from an inexperianced person Java is really hard It took me a while to get used to it, some biult in funcinality will boost creativeity and allow more things to be made, Why? Because it is EASIER.

That is the way open source works. You have many small projects contributing to add features to the whole. We don’t want to bloat API or the server implementation with lots of features not everyone is going to use. I sure as heck am not going to script anything so I don’t want a scripting feature slowing down my server, having a plugin for it works perfectly. Same with any other feature you could come up with. Why is it a bad thing to make use of the HUGE community of plugin developers?

It sounds like what your looking for is an officially supported solution. The thing is the potential slowdown of a plugin handling something like a secondary scripting system is honestly up to the plugin design itself. There is a reason people don’t write things like scripting plugins, loggers, etc. overnight. It takes time to optimize and refactor to a point where its worth using.

if something like this was included by default, not only does it end up equating to TWO different API’s being built (Sponge, which provides access to the server, and another which interprets X scripting language into Sponge), it creates added development overhead, that could easily be offloaded to another individual or team. Abstraction is a huge part of programming. By definition, a class should only serve one purpose, and a function should only accomplish one task.