Re: Keywords and Namesapces
- Posted by DerekParnell (admin) Oct 09, 2011
- 40207 views
Vinoba said...
An extra parameter is not particularly time consuming nor difficult to implement ...
The main purpose of a programming language is to enable PEOPLE to read and write programs, thus it is important to make this process easier. The use of names to identify functionality for people has been shown to be more efficient than other methods.
To give another, more extreme implementation of your idea of parameterizing functions, we could have done this ...
file_access( fileid, access_type, otherdata .. ) -- access_type: 1 -> Open a file -- access_type: 2 -> Close a file -- access_type: 3 -> Read from a file -- access_type: 4 -> Write to a file
The real difficulty is to give good names to things, and that doesn't just apply to programming.