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

vb.net - How to ignore if a cell is empty nothing -

Sort a complex associative array in PHP -

recursion - Can every recursive algorithm be improved with dynamic programming? -