Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

there's an entire field of programming languages which work just like that. One of the most mainstream ones is Qt's QML: https://www.qt.io/product/qt6/qml-book/ch04-qmlstart-qml-syn...

Here's a trivial example:

    Column {
        Dial {
            id: dial
            from: 10
            to: 100
            value: 30
        }
        
        Text {
            text: (dial.value * 100) + "°C"
            font.pointSize: dial.value
        }
    }


whenever the slider's value changes, all the properties of the text are automatically updated. Live demo: https://tinyurl.com/2p5z5ufc


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: