slint GUI, for RUST, C++, nodejs, dotnet. cloud add Dlang support

Tobias Hunger tobias.hunger at slint.dev
Sat Oct 14 08:46:50 UTC 2023


I stumbled into this thread on Google, I have tried D about a 
decade ago but did not stick around. I do contribute to slint 
though.

On Friday, 13 October 2023 at 15:09:27 UTC, ryuukk_ wrote:
>> There is a c# https://github.com/microhobby/slint-dotnet 
>> compiler implement,  maybe sone one is capable to translate 
>> this into dlang ?

There are also C++ and JS bindings. Especially the C++ one is 
further along.

> I don't understand why slint is popular, it's one of the worst 
> library out there, and it uses a custom scripting language

What makes you say so?

I consider the description language to be a huge plus: It allows 
us to have a design tool, a live preview and allows 
non-programmers to design and update the UI. That code is 
compiled into native code (rust, c++, ...), using a small runtime 
library written in rust. Nothing gets interpreted (well, we do 
have an interpreter, too).

It is not a scripting language on purpose, more a description 
language. Think more HTML than JS. https://slintpad.com/ has an 
online editor if you want to play with it.

Basically you describe the UI and an interface into the host 
language (properties, functions and callbacks). As long as that 
interface does not change, a dev can not break the UI and a UI 
designer can not break the business logic. I love that part:-)

> Just look at the generator, it's very basic: 
> https://github.com/microhobby/slint-dotnet/blob/main/SlintDotnet/Generator.cs
>
> The resulting API however.. very ugly: 
> https://github.com/microhobby/slint-dotnet/blob/main/test/Program.cs

That code has a lot of code in there demoing all kinds of things 
you will typically not do in an application. A typical 
application usually creates the UI, sets a few properties and 
callbacks to bind the business logik to the UI and then calls 
run().

> Can't really call this a binding

I was very impressed by it: It works(TM) and was done by one 
person without involving anyone from the core team in a few weeks.




More information about the Digitalmars-d mailing list