Reflection?

Monkey Archive Forums/Monkey Discussion/Reflection?

slenkar(Posted 2012) [#1]
A few months ago it was mentioned that reflection would be easy to add to monkey because of the internal rewrite, is that still a possibility?


skid(Posted 2012) [#2]
I think it's pretty close, Mark showed me some working code the other day.


wiebow(Posted 2012) [#3]
Nice. Mark told me on google+ some days ago that he was at 90% or something. I'm awaiting this as well.

here is that post: https://plus.google.com/u/0/102717020783560043459/posts/4J9BLcTSnqU


Paul - Taiphoz(Posted 2012) [#4]
slenker I'm wondering what your use would be, do you have an implementation in mind or is it just something you would like to be able to do.


ziggy(Posted 2012) [#5]
I remember reading on the Mark blog for the new year that reflection and an interpreter where two things he was trying to add to Monkey. I hope one comes after the other... we'll see..


slenkar(Posted 2012) [#6]
slenker I'm wondering what your use would be, do you have an implementation in mind or is it just something you would like to be able to do.

it allows you to save a game with about 2% of the effort :)


I think it's pretty close, Mark showed me some working code the other day.

thanks

Nice. Mark told me on google+ some days ago that he was at 90% or something. I'm awaiting this as well.

here is that post: https://plus.google.com/u/0/102717020783560043459/posts/4J9BLcTSnqU

google+ says its been deleted :)


Xaron(Posted 2012) [#7]
No slenkar, probably no access because it's more in a private circle?


wiebow(Posted 2012) [#8]
Well, take my word for it then :)

I'll be using reflection to create a solid unit testing module and port my component based entity system to monkey. Should be fun.


Paul - Taiphoz(Posted 2012) [#9]
well. im a bit of a dumbass clearly cos this reflection stuff still has me trying to swim to the surface to catch a breath.

Can some one give me the dumbass example of how it works, and what you might use it for.

thanks.


slenkar(Posted 2012) [#10]
I only ever use it to save a game and nothing else,

I am going to release a module when the reflection code is fixed that allows you to save any object to a string (called serialization).

If you want to allow scripting languages to influence Monkey Classes it will also be useful. But only the creator of the scripting language will be writing code that uses reflection.


Samah(Posted 2012) [#11]
I am going to release a module when the reflection code is fixed that allows you to save any object to a string (called serialization).

Yeah, I was thinking of updating the Diddy serialisation module to be a little less sucky. :)

If you want to allow scripting languages to influence Monkey Classes it will also be useful. But only the creator of the scripting language will be writing code that uses reflection.

It allows me to rewrite a lot of MonkeyLua. Now you can directly access Monkey fields from your Lua code. Coming up next, method calls! :)