matthewmueller / joy

A delightful Go to Javascript compiler (ON HOLD)
https://mat.tm/joy
GNU General Public License v3.0
1.32k stars 35 forks source link

Eliminate unuses struct values #49

Open matthewmueller opened 7 years ago

matthewmueller commented 7 years ago

This would be a nice enhancement. For example, in Go the proper way to represent an "" tag would be something like this:

type A struct {
    Class string
    Href string
    Title string
}

However, having all the possible fields of an <a> tag is wasteful, we can do better than this by only including the properties we're going to use.