gregtatum / talk-killing-this

Killing JavaScript's `this` - Practical Functional Programming
4 stars 0 forks source link

Golang style structs #2

Open azer opened 9 years ago

azer commented 9 years ago

not sure if it was considered, I haven't had chance to go through all the ideas yet... just wanted to mention a solution that works for me; https://github.com/azer/new-struct

gregtatum commented 9 years ago

Oh cool, that looks to work fairly similar with what I'm doing now, but with a bit more opinion to the final structure. I played around with making some custom constructor style functions like that, but opted for doing it manually so I wouldn't have to pull in something to every project and so that I could break the rules if I wanted to :)

Thanks for sharing! I didn't go as much into some of the higher level construction methods I've been playing around with now as it's a bit more of an opinion based approach.