mani-language / Mani

Máni ... an awesome, super simple programming language!
https://mani-language.github.io/
Mozilla Public License 2.0
28 stars 7 forks source link

Depreciated tag for functions #93

Closed crazywolf132 closed 5 years ago

crazywolf132 commented 5 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

It would be good to have a depreciated tag we could append to functions, much like what JAVA has. Simply to let users know that a method is going to be replaced soon.

The system, when it finds the tag, it does the same as the internal tag, but instead of changing access rules... (allowing some, but not all functions from accessing it.) Will instead print out a message along the lines of The developer has marked this function as Depreciated, Function on line [number].

Describe the solution you'd like A clear and concise description of what you want to happen.

One way we could do this is with a depreciated tag at the front of a method. Like so:

depreciated fn someFunction() {
say 'I am just a function';
}

Additional context Add any other context or screenshots about the feature request here.

This might also be allowed to be coupled with the internal tag, but must come after it. Like so:

internal depreciated fn someFunction() {
say 'I am just a function';
}
crazywolf132 commented 5 years ago

This is finished. Implemented exactly as above. #38 should refer to here for docs.