Discord
Login
Community
DARK THEME

Microscript polymorphism

Can you have polymorphism in Microscript. So like for a constructor can I have variable arguments. If not can I have polymorphism in another way, especially for constructors.

Regarding the arguments, Gilles made a arguments list available within the function.

showArguments = function()
  print(arguments)
  for i=0 to arguments.length-1
    print(arguments[i]+" - "+arguments[i].type)
  end
end

That gives you something to play around with :)
I think it's not in the documentation yet (might be wrong), but you find discussions about it on the Discord.

Live Long and Tinker

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community