c# - Is there a language that supports a way to mark a parameter as not getting modified by a function? -


in c# there keywords allow 1 mark parameter ref, out, or ordinary parameter.

are there languages support marking parameter being passed in won't modified function?

if parameter list , function called clear() on list, in order language know parameter wasn't changing, guess such language need way of marking whether or not method modified object's internal state.

yes, in pascal can specify constant parameter, tells compiler programmer won't change parameter in function.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -