HuckRidgeSW / hvue

A GopherJS & go/wasm binding for Vue.js
MIT License
49 stars 10 forks source link

Remove reflect ? #4

Closed ghost closed 6 years ago

ghost commented 6 years ago

Where is it used ? Can likely get rid of it using codegen.

HuckRidgeSW commented 6 years ago

It's used mostly in vm.go, but also in option.go and util.go. In NewT() in util.go, I use it to interact with objects of arbitrary type (more or less; they're assumed to be structs, at least). I'm not sure how to get rid of reflect in that context, even with code generation.

Why do you want to get rid of it?

ghost commented 6 years ago

To be honest it was more instinctive reasons. Just been there in complex reflection code and it can sometimes ease complexity to just codegen.

I need to play with and look at the functions you mentioned I think first.

Will close this as I think it's not worth optimising it as you seem cool with the reflection.