Stevertus / mcscript

A programming language for Minecraft Vanilla
https://mcscript.stevertus.com
MIT License
233 stars 16 forks source link

Why Node? #16

Closed HoldYourWaffle closed 4 years ago

HoldYourWaffle commented 4 years ago

Hi there! I was thinking about writing something similar to this when I stumbled upon this project. I have to admit that I haven't really looked into in very deeply yet, but there was one question that immediately sprung to my mind:

Why did you choose to use Node.js instead of something more native to the ecosystem like Java (or possibly Kotlin)?

Opinions about the design of these particular language's aside, I'd think that creating a compiler in Java/Kotlin would be easier due to the strongly-typed nature (although this could of course be circumvented by using something like Typescript). It's also 'native' to the minecraft ecosystem, given that the java edition is written in it (mindblowing isn't it?) and so are basically all (forge) mods. Everyone that has minecraft installed also has the included JVM, so installing an extra runtime wouldn't be necessary.

I'm not trying to 'judge' you or anything, I'm honestly just curious. I might try to contribute to this project in the future (if I find the time for it), so if there's anything you "need help with" I'll be happy to hear it 😄

MinimineLP commented 4 years ago

I think there are some reasons: First: Stevertus is a developer that can code javascript, but not java 2nd: Javascript is much easier to write, the code is not easy to understand, but it is easier and faster to write (I'm not in Kotlin, but I can totally say this about Java because I wrote a java version of this compiler a year ago)

If you want to have a java edition of mcscript: I've made one about a year ago, it is called mcscript-java. I think I will not continue developing it, but it is working (Some features are different from orginal mcscript and there are some bugs)

HoldYourWaffle commented 4 years ago

That makes sense, thanks!