Direct foundations for compositional programming