Hacker News new | ask | show | jobs
by khaledh 1920 days ago
I wish there was a bi-modal programming language: a "design" mode, and an "implementation" mode.

Design Mode:

    - Define domain model: entities, relationships, constraints
    - Define behaviour: state machines, conditions, triggers, calculations
    - Define architecture: systems, subsystems, modules, interfaces/apis
    - Define rules for composition and communication
    - Define extensibility points, service provider interfaces
    - Define access points: ui, cli, api, lib
Implementation Mode:

    - Map domain model -> db schema, code constructs
    - Map behaviour -> code to evolve domain model/state over time
    - Map architecture -> libraries, executables, services, network topology
    - Map composition rules -> snap-in components from architecture using defined interfaces
    - Map extensibility points -> callbacks, hooks, discovery
    - Map access points -> connect ui/api to model and behaviour
1 comments

Working on something similar in my spare time, its quite... exhausting to be honest. Basic premise is you define a core model or different types of models and use transformers to transform them from one type to another, building a huge structure in the process than can help you generate stuff and notify of updates. The biggest problem is cascading updates, recursive calls, UI and performance in general. Currently doing it on the JVM but I think I should migrate to something closer to machine code to net realistic performance.