Giter VIP home page Giter VIP logo

Comments (1)

hecrj avatar hecrj commented on August 27, 2024 22

Personally, I am not fond of using DSLs to solve this particular problem. I think they:

  • Introduce a learning barrier. You no longer need to know only Rust, but the DSL too and all its quirks.
  • Reinvent the wheel. View code is rarely a simple declarative tree. Most of the time, there is complex logic involved. You may need to conditionally show something, build a list out of some values in your state, etc. This either forces these DSLs to implement their own programming language, or allow embedding parts of native code.
  • Feel like magic. You no longer see the actual code, which makes it harder to reason about.
  • Solve a non-existent problem. Boring code and low-maintenance boilerplate are not worthy of a complex abstraction.
  • Hide actual issues. Instead of focusing on building simple APIs in the programming language of the library, the focus shifts towards building an abstraction to actually avoid writing in that language. Rust is great! Why avoid writing it? Is something verbose? Create helper functions! Is there duplication of concerns? Use traits or build your own widgets!

a declarative way for defining pieces of UI is much nicer

Could you maybe elaborate a bit on this? Why do you think it's nicer? What do you think we can improve when we compare our current approach with the vgtk approach?

from iced.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.