Add INCLUDE statement?
Created by: carbontwelve
Not sure if it's beyond the scope of this language given how its a bit tongue in cheek but it would be nice to have the ability to split a program up into components and then include them aka the COBOL INCLUDE statement.
Given a directory structure like so:
.
└── src
├── main.ldpl
├── member-name.ldpl
└── another-member-name.ldpl
You could within the DATA division allow an INCLUDE statement with similar syntax to COBOL:
DATA:
INCLUDE member-name.ldpl
INCLUDE another-member-name.ldpl
Or maybe have an additional INCLUDE division?
In either case the include could act as a "copy-paste" merging the DATA and PROCEDURE divisions of the included source into the requesting file in the order in which they are included.
You could go one further and allow the INCLUDE statement in the PROCEDURE division to open the possibility of dynamic includes ;)
In adding includes it opens this language up to the entertaining possibility of libraries.