A simple demo for the Pappe embedded interpreted syncrhronous Swift DSL.
This demo replicates the Blech blinker demo for the Pappe Swift DSL.
It shows how the synchronous programming approach simplifies the control logic even in a high level language like Swift and on a platform like MacOS with its many frameworks.
The program uses the SpriteKit framework which alternates at 60Hz between updating the scene state via a user provided callback and presenting the new sceen state automatically. This callback approach normally tears the imperative control flow apart forcing you to use a state-machine instead which get hard to follow quickly. The imperative synchronous programming paradigm as proposed by languages like Blech helps you to stay in control instead.
Open the "BlinkerPappe.xcodeproj" project file with Xcode >= 12.0 - it should automatically resolve the needed Pappe Package dependency.
The Pappe DSL is more of a proof of concept. It has many shortcommings like:
- No causality checking.
- Interpreted instead of compiled.
- Untyped and unchecked variables.
- Poor Test coverage.