buggins / dlangui

Cross Platform GUI for D programming language
Boost Software License 1.0
816 stars 121 forks source link

OOPless version #621

Closed MyTDT-Mysoft closed 1 year ago

MyTDT-Mysoft commented 2 years ago

there isnt a version of it for real programmers? not using stinky OOP?

Superbelko commented 2 years ago

Even though I also don't like the code and design, rewriting it even partially is basically meaningless, primarily because of lack of traction.

On the other hand it is flexible and simple enough to understand, and there is no other UI library for D that allows one to quickly hack something customizable like dlangui. So if I need a GUI for my yet another crappy PoC tool that I will throw up after a week or two dlangui is my number 1 choice.

MyTDT-Mysoft commented 2 years ago

i see, yeah i wanted to really give a chance to D, because i liked many of things unlike C++ and the syntax isnt horrid like RUST and have nice ways to do what i use most (macros)... but unfortunately the fact that it even have OOP means that people will use and abuse of it in a non optional way... and the result is this... i can't find a GUI library without OOP :(

Superbelko commented 2 years ago

There is a reason for that.

Anyway you might want to look at immediate mode UI's like ImGui. I have this bindings for that but it is not quite straightforward to set up, there is also alternative wrappers available in dub and on GitHub.

Unfortunately there is no declarative style alternatives like Flutter, at least not that I'm aware of.

https://github.com/Superbelko/imgui-d

MyTDT-Mysoft commented 2 years ago

There is a reason for that.

Anyway you might want to look at immediate mode UI's like ImGui. I have this bindings for that but it is not quite straightforward to set up, there is also alternative wrappers available in dub and on GitHub.

Unfortunately there is no declarative style alternatives like Flutter, at least not that I'm aware of.

https://github.com/Superbelko/imgui-d

thanks... but wrappers against bloat-free bloated (because C++ / OOP) imgui wont do the trick... i guess i will just use winapi directly in D, and add some D wrappers without OOP to simplify stuff and then implement winapi library for other platforms... since nobody cares about having a clean C usable gui library nowadays :) , i had to do for raspberyPi as well so no biggies... better than forcing OOP features...

at least D will bring me closer to also have native code (without having to handle Android Studio or related bloat), then possible i could code for android in both C and D and freebasic (with GUI ofcourse, even that that will require handling the JVM from C, and then wrapping their functionality as the same "winapi like library"

GrimMaple commented 2 years ago

bindbc-imgui gives you a pain-free experience in using imgui, with C-style API also!

There is no reason in rewriting dlangui, because it's currently in maintain-only mode. I'm going to keep up up-to-date with modern compilers and fix bugs, jsut slowly adding whatever I need

MyTDT-Mysoft commented 2 years ago

bindbc-imgui gives you a pain-free experience in using imgui, with C-style API also!

There is no reason in rewriting dlangui, because it's currently in maintain-only mode. I'm going to keep up up-to-date with modern compilers and fix bugs, jsut slowly adding whatever I need

nope... even the samples of imgui is calling methods out of objects so its OOP CRAP like... even if its manually calling a constructor.. but the function is inside the struct for no reason at all, and since i didnt had to do cfg._default_ctor = something ... to define that function that was suppose to crash... unless it had a constructor of its own... which is impossible without OOP... so....

ImFontConfig cfg; cfg._default_ctor();

which is not tolerable to me.

GrimMaple commented 1 year ago

I'm closing this as won't fix :)