Hacker News new | ask | show | jobs
by cabalamat 1740 days ago
> But writing the UI descriptions would be harder in JSON than in my bespoke language.

For example, this:

    menu "File" {
        menuItem @New "New"
        menuItem @Open "Open..."
        menuItem @Save "Save"
        menuItem @SaveAs "Save as..."
        menuItem @Exit "Exit"
    }
Might become something like this:

    {'widget': 'menu', 'text': 'File', 'contents': [
            {'widget': 'menuItem', 'id': 'New', 'text': 'New'},
            {'widget': 'menuItem', 'id': 'Open', 'text': 'Open...'},
            {'widget': 'menuItem', 'id': 'Save', 'text': 'Save'},
            {'widget': 'menuItem', 'id': 'SaveAs', 'text': 'Save as...'},
            {'widget': 'menuItem', 'id': 'Exit', 'text': 'Exit'}
        ]
    }
Which would turn writing a UI from something that's a pleasure to something that's a chore. People who would deliberately write software that's a chore for others to use ought not IMO be writing software that will be used by other people.