There was discussion about adding Function Builder functionality to the Package manifest. With MTC I think it would look really great:
let package = Package(name: "MyPackage") {
Executable("App", targets: "AppTarget")
} targets: {
Target("AppTarget")
}
EDIT: It was said that the above code doesn’t clearly show that the unlabeled closure is meant to represent the package’s products and I agree. I thought that was obvious and that I didn’t have to explicitly point this out (my bad). Such an implementation would not be really expressive with the currently proposed feature. Because of that I also don’t think it should be added without the ability to use labels in all the closures. Nonetheless, I do feel it is a step in the right direction as it holds great potential.