使用哪种语言编写普通的GTK3应用程序是否重要?用户会注意到差异吗?

huangapple go评论94阅读模式
英文:

Does it matter what language I use for normal GTK3 apps? Will a user notice the difference?

问题

我想用GTK3制作一个应用程序。
这将是一个用于管理文件(复制、移动等)的应用程序,但主要是一些具有设置的窗口(普通选项卡、复选框、选择框、输入框等)。
我可能还需要一些自定义绘制的小部件。

作为编程语言,我想使用Go,因为它快速且易于使用。我尝试了gotk3库,示例在我的MacBook上似乎工作正常。

但我有点担心性能问题。因为cgo用于使用gtk库,这会使应用程序变慢吗?或者对于普通应用程序来说,这仍然足够快吗?

另一种选择是使用Rust。gtk-rs似乎比gotk3更好,因为在Rust中使用C库更容易。

(我对GTK、C、Rust都没有经验)

gotk3对于良好的用户体验来说足够快吗?
在gotk3/gtk-rs/plain C中,我会注意到差异吗?

英文:

I want to make an application with GTK3.
This will be an application to manage files (copy, move, ...) but mostly some windows with settings. (normal tabs, checkbox, selects, inputs, ...)
I may also need some custom drawn widgets.

As a language I would like to use Go because it is fast an simple to use. I tried the gotk3 library and the example seem to work fine on my macbook.

But I'm a bit worried about performance. Because cgo is used to use the gtk libraries, will this make the application slow? Or is this still fast enough for normal applications.

An alternative would be to use Rust. gtk-rs seems better then gotk3 because using c libraries in Rust is easier.

(I have no experience with GTK, C, Rust)

Will gotk3 be fast enough for a good user experience?
Will I notice a difference between gotk3 / gtk-rs / gtk in plain C ?

答案1

得分: 3

会gotk3足够快以提供良好的用户体验吗?

是的。除非你编写一个非常特定的程序,比如低延迟交易,你编写应用程序的语言并不重要。

只需选择你喜欢的语言:Go、Rust、C、Python、D等,它们都被广泛用于各种GNOME应用程序而没有问题。

重要的是你使用的算法。例如,如果你使用O(n²)而不是O(log n)的算法,无论是在C、Rust还是Go中,都会表现糟糕。

英文:

> Will gotk3 be fast enough for a good user experience?

Yes. Unless you write a very specific program like for low latency trading, the language in which you write your app does not matter.

Just pick up the language you prefer: Go, Rust, C, Python, D, etc. they are all used in various GNOME application without trouble.

The thing that matters is the algorithm you use. If you use an O(n²) instead of an O(log n) algorithm for example, it will be bad in C, Rust and Go.

huangapple
  • 本文由 发表于 2017年9月1日 16:35:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/45996219.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定