-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sub-data sections #113
Comments
I was thinking that this could be maybe coupled with a way of passing parameters to sub-procedures, something like:
What do you all think? |
I was thinking that maybe this would lead to easier to implement libraries than the COBOL based model we previously proposed, @dvkt. We could just write a "library writing standard" and state that is good practice to name the global libraries inside a library as |
I think this would be a great addition to the language! |
I have been toying with LDPL for a while now, and one of the things that irks me the most is the sheer amount of variables you need to create in order to hold stuff and not override the data of one of the other methods.
my proposed solution to this is
SUB-DATA
sections. I am proposing that before everySUB-PROCEDURE
you will be able to declare an optionalSUB-DATA
section. all variables declared inside aSUB-DATA
section act like local variables. they are only usable inside aSUB-PROCEDURE
and (optionally) are not reset after every call to theSUB-PROCEDURE
(in order to be compatible with the whole "variables are persistent between scopes thing the language has going on already) . they also should not have any naming conflicts with other internal variables (of other sub-procedures).example:
tl;dr: persistent local variables
The text was updated successfully, but these errors were encountered: