Sming provides an API that is similar to Arduino (as well as including ported versions of some Arduino libraries) so that the learning curve is smaller for those who are familiar to Arduino.
Sming programs have a user specified init() method which is similar to the setup() in an Arduino sketch. However there isn't the same concept of the loop() method which executes continuously (although it shouldn't be hard to write yourself).