For instance, would Python be a more ergonomic programming language since it doesn't force you to make curly braces which requires the AltGr key. Also Python usually requires less code to achieve the same or am I being biased towards Python and PHP actually is an ergonomical and comfortable language despite forcing the programmer to use the AltGr key? Isn't forcing the programmer to use the AltGr key not very ergonomical?
|
|
No. Characters by themselves are intangible, and therefore cannot be ergonomic or non-ergonomic. What really matters in the end is your environment: your keyboard, IDE or even operating system. It is up to them to bind these arbitrary characters to the coder's physical movements. If they do this inconveniently, then it's their fault. |
|||||||||||
|
|
Whether a certain character sequence is comfortable or not depends on many factors:
If you are concerned about ergonomics, reading code weighs much heavier than writing code, simply because you spend much more time doing the former than the latter. If anything, a language should be optimized for ergonomic reading. |
|||
|
|
|
Ergonomic score is relevant at the time of writing. Reading, maintaining, upgrading, etc which go on for ages after the initial release are all relevant for the whole life of the program. Since these are more important for a good life of a program after it is written first, the language's ergonomic score makes negligible sense, if any. |
|||||||||
|
|
I think ergonomics in programming languages are more related with the way people think or read and less related with the way people type. Related: Ergonomics is subjective in the same way some people prefer an armchair and other people prefer other armchairs. However it's a subjectivity where there are clear patterns, like not too hard, not too soft, not slippery, not sticky, not asphyxiating (even if it is subjective most people like to breathe), etc. Try to read Brainfuck or Malbolge. Those are fairly good examples of how bad ergonomics can get to be. Python, on the other hand, receives awards from time to time as a good language. Seriously, ergonomics in programming languages matter a lot, as in any human-machine interface. |
|||||||
|
|
The ergonomics of a programming language (or lack thereof) are entirely subjective, there is no way to objectively measure them. Having said that, there's no denying PHP could use some improvement regarding programmer friendliness as it lacks consistency. Some built in functions are lower case with underscores (get_class), some don't have underscores (gettype) and some are camelcased (bindParam). Some search/replace functions take their arguments in the form ($needle, $heystack) whilst for others it's ($heystack, $needle). And PHP constants aren't named in a consistant way. Some are prepended PHP_ and some aren't. (PHP_EOL versus DIRECTORY_SEPARATOR) As of PHP 5 new additions to the language have tended to be more consistant, so the situation is certainly improving, but PHP still carries a lot of baggage of the past around with it. |
||||
|
|
This is not a problem with your programming language as such, but with your keyboard layout which has special characters elsewhere than the one used by Americans(which have defined most of the current mainstream languages). Considered buying a US-ASCII keyboard for programming? |
|||
|
|
|
Yes. Anything that involves the body can be measured ergonomically, although the final score can change due to different keyboards, etc. |
|||
|
|
|
Try the following with Python and read the result:
Think about the statements and you may be able to decide if you like it or not. Then you will know whether you would like Python or not. Maybe :) For me personally, Python is easy to type, it is easy to read. This way it is ergonomical in the sense of input/output related to the progammer. My objection against Maxpm's answer is that also mentally clear basic abstractions are part of the ergonomy as typing ergonomy will not save my headaches if the language is not understandable from the abstractions point of view. Once the program becomes complex, you need refactoring, making functions out of the blocks of code (easy in Python with simple editors), you need to split functionality to modules (also easy). For me Python and C++ are very nice, ergonomic languages (not the APL). The example of non-ergonomic language for me is SQL. True, you can type it all in lower-case. But then it is unreadable for those who are used to traditional upper-case keywords... When forced to type the keyword in upper-case, or you have to get used to using CapsLock, or your Shift-little fingers will hurt. |
||||
|
|
