Hacker News new | ask | show | jobs
by treuks 1430 days ago
Really interesting stuff, makes me wonder if Perl is a good language for something like this.
2 comments

Based on my digging around, I think Rebol was really good for GUI stuff back in the day as there are hundreds of cool examples of things like Tetris in like 1/4 page of code. Delphi was supposedly really good as well in the 90s when people used it for all kinds of desktop apps. VB6 might be in there as well. Matlab makes this all pretty easy as well if you have a license as it has a form designer and just makes it really easy to do that kind of stuff. C# has Winforms and other stuff to build extremely detailed and complex GUIs, but it's not as simple as Matlab for sure. Tcl has a very common library called Tk that can do a lot of simple GUI work like if you want a button on a form, but it didn't seem to be a good bet for scientific work when I checked. There's a toolkit for Pharo Smalltalk that can do really cool graphics stuff, but Smalltalk is pretty niche in a lot of ways. Python has a bunch of GUI toolkits, but none of them seem very good. Java and languages on the JVM can use some of those toolkits like "Swing", but I don't find it very intuitive. 8th has a built-in native GUI, but it's mainly useful for buttons and drop-downs I think. Mathematica surprisingly has a pretty decent GUI setup in their Notebooks as well as advanced shoot for graphics.
What makes a good UI language? The earlier patterns of GUI development (before the "reactive" hype train) were rather object-oriented, so having that helps (otherwise it quickly gets rather verbose, cf. Xt/gtk). And for smaller event handlers, anonymous functions/lambdas etc. Perl has that, but so do many other languages.

Speaking of verbosity, having to lay out all the widgets in an app with all their individual properties, coordinates etc. quickly gets quite dense. Here having things like good literal definitions, flexible arguments (variable/default) can make that a lot more concise.

If the language itself doesn't do that for you, tooling quickly becomes necessary. This can be a UI designer (which is usefule in any case), or some ad-hoc UI description language. Which tend to suck (UIL, XAML etc.), and thus require a UI builder application anyway.

Performance is sufficient. Perl always had a lot of packages to help integrating with services etc.

So, yeah, I'd say it's pretty decent, but hardly unique. That was true 20 years ago, and even more so now. Not that anyone cares about desktop UIs.