Nov-18-2019, 12:51 AM
I have 3 things i'd like to post as a suggestion to python development team but have no idea where to find them or how to contact them.
Use + strictly for math operation
Use & strictly to COMBINE what ever you have.
For example:
5+5=10 math operator
5&5=55 combine operator
5+"string" = error
5&"string" = "5string"
Escape character.
"string \n continues" is a horrible way to break the string.
"string " & @LF & "continues" is allot better. It makes allot of visual sense.
It eliminates problems with typing paths such as "C:\Windows\network drive" OMG i just escaped the line ?
Fixing these accidental escape characters is a nightmare. You might as well get rid of them all and replace then with @NL new line or something else and utilize the above proposed COMBINE operator to join them as in: "line 1" & @NL & "line 2" etc
This method makes allot more sense to use then to use escape characters that can sometimes get you in allot of trouble.
Its easier to use & @NL & then to split the path into chunks and put it back together to avoid errors.
Also
Some imported libraries have internal function names that user may call with a function name.
If i have a code that uses a variable name that for what ever reason matching this function name, my code will be screwed unless i rename either function i am calling or all of my variable names that match.
For example:
variable named "printresult"
Imported library has function named "printresult"
Suddenly, when someone is looking at the code, he gets confused without even realizing that "printresult" is a function name inside imported module.
If there was a very simple way to visually differentiate variables from the rest of the code, code learning and code understanding would be a day/night difference.
So my question about variable naming is: Why cant we use $ symbol for variables ?
$printresult vs printresult are two VERY DIFFERENT words in my opinion and it will be allot easier for IDE to identify which one is which and give it a color of choice.
To this day, i have yet seen IDE that can tell variable from a object, class or a function.
All colored the same.
I do understand that you recognize them by how they are placed and where they are used, but my point is that: differentiating them visually will make learning python as well as reading and understanding the code allot easier.
Have a look at AutoIT script. Its super easy to understand whats going on because everything has very unique color identification.
Use + strictly for math operation
Use & strictly to COMBINE what ever you have.
For example:
5+5=10 math operator
5&5=55 combine operator
5+"string" = error
5&"string" = "5string"
Escape character.
"string \n continues" is a horrible way to break the string.
"string " & @LF & "continues" is allot better. It makes allot of visual sense.
It eliminates problems with typing paths such as "C:\Windows\network drive" OMG i just escaped the line ?
Fixing these accidental escape characters is a nightmare. You might as well get rid of them all and replace then with @NL new line or something else and utilize the above proposed COMBINE operator to join them as in: "line 1" & @NL & "line 2" etc
This method makes allot more sense to use then to use escape characters that can sometimes get you in allot of trouble.
Its easier to use & @NL & then to split the path into chunks and put it back together to avoid errors.
Also
Some imported libraries have internal function names that user may call with a function name.
If i have a code that uses a variable name that for what ever reason matching this function name, my code will be screwed unless i rename either function i am calling or all of my variable names that match.
For example:
variable named "printresult"
Imported library has function named "printresult"
Suddenly, when someone is looking at the code, he gets confused without even realizing that "printresult" is a function name inside imported module.
If there was a very simple way to visually differentiate variables from the rest of the code, code learning and code understanding would be a day/night difference.
So my question about variable naming is: Why cant we use $ symbol for variables ?
$printresult vs printresult are two VERY DIFFERENT words in my opinion and it will be allot easier for IDE to identify which one is which and give it a color of choice.
To this day, i have yet seen IDE that can tell variable from a object, class or a function.
All colored the same.
I do understand that you recognize them by how they are placed and where they are used, but my point is that: differentiating them visually will make learning python as well as reading and understanding the code allot easier.
Have a look at AutoIT script. Its super easy to understand whats going on because everything has very unique color identification.