Skip to content

Method Overloading #727

Answered by SquidDev
pupnewfster asked this question in Q&A
Feb 25, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

I am working on a system for Mekanism to allow me to more easily define methods in am abstracted method to allow me to easily support both ComputerCraft and OpenComputers (if it ever updates).

Personal opinion incoming, but IMO the easiest solution here is to not go building your own abstraction layer right now, and just use @LuaFunction. There's no obvious timeline for when OC is going to update (the's a Fabric port in progress, but not much use to you :p), and until then you're just creating work for yourself.

Anyway, onto the actual question:


Lua doesn't really have a notion of methods or method overloading. As far as its concerned, test is a single function and, like all functions,…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@pupnewfster
Comment options

@SquidDev
Comment options

@pupnewfster
Comment options

Answer selected by pupnewfster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants