Re: Keywords and Namesapces

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
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.

The main purpose of a programming language is to enable creation of a software that can be used to do repetitive tasks efficiently and fast. In this equation, the time spent by a programmer is colossally higher than the time taken by the final program to execute. THEREFORE, IT is both justifiable and IMPARATIVE, that in order to ease the task of programmer, you (u.e. the creator of language) give him a reasonable number of functions without cluttering him with nearly identical functions that he has to constantly look at a manual to find.

DerekParnell said...

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.

There is no need to carry my suggestion to an extreme to prove me wrong.
Quite simply 1600 functions in the wxEuphoria are, in my opinion, far in excess of what they should and could be and would prevent people from using it.
For my own needs, I am already using condensed versions as illustrated by me above and teaching those rather than the 6-8 variations of the same, and students are taking to Windows programming nicely. Real life activities are full of such condensations. Human brain can catalog it better than remembering different names.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu