dontpanic92 / wxGo

Golang wxWidgets Wrapper
Other
403 stars 51 forks source link

Make wxGo follow wxPython API #77

Open programmingkidx opened 2 years ago

programmingkidx commented 2 years ago

wxGo is a much easier to use language than C++. It has features that make it more similar to Python than C++. So I think it would be better if wxGo was made more like wxPython rather than the C++ based wxWidgets library. wxPython is way easier to use than wxWidgets and is officially supported by the maintainer of wxWidgets. An entire program in wxPython is this simple:

import wx app = wx.App() frame = wx.Frame(None, title="Main window") frame.Show() app.MainLoop()

My first suggestion is change the name of widget creating functions by removing "New" from the name. So instead of NewFrame() it would be Frame().

emperor-limitless commented 2 years ago

I'm not the maintainer nor a contributor, But it seems you didn't understand go properly yet. Go only has structs, Which has no constructor function to them. They're like C structs, So the way the go people make a constructor to a struct is making a function and calling it For example.

type MyStruct struct {
    MyField string
}
func NewMyStruct(field string) *MyStruct {
    return &MyStruct { MyField: Field }
}

Also, This repo was last updated at 2018 and the readme clearly states it's sadly no longer maintained. Would be fun to use wx with go but it seems the interest for this library is dropping with everyone with each day.

programmingkidx commented 2 years ago

Yeah I am new to Go. Thank you for the comment.