Hi @certik, I just read the open issue about dot. I agree with your reasoning, but I have more reasons to dislike it. Let me elaborate. When we write Fortran, we usually do not care about coding speed, ie. for every hour of coding we usually spend days if not weeks defining our physical problem and its equations with pen and paper, a few milliseconds gained when typing for me is insignificant (shout out to all of you vim/emacs evangelists…). Therefore, what I meant when I said in my last point that dot is faster to type, is that dot being within the range of your finger (when blind typing) does not require to take your eyes from the monitor to look it up, while in case of the percentage symbol you rely on muscle memory and half the times betrays you, e.g. hitting “enter” instead of “shift” etc., and this mistyping results in attention destruction. It happens to me and some times I lose my line of thought.
My second reason is more of a personal taste. The percentage symbol has no place in any modern language unless it is to operate as modulo. It’s non-intuitive, ugly and certainly doesn’t help with people coming from other languages.
What I suggest:
- Comming the new standard, replace percentage symbol with dot for OOP, and deprecate all text relational operators, their mathematical equivalents already exist and are valid in Fortran. Also, replace the logical operators .and. with && and .or. with || , while .True. and .False. with True and False. (We do have nullify without dots surrounding it, why can’t we have true and false in the same way).
- Deprecate all text operator overloading. I find this feature unique to Fortran and absolutely useless, nothing that you can’t express with a simple function or subroutine. Not to mention that I have never seen it implemented in production code (I have only seen examples in tutorials).
- When compiling your code make it the default way to be with dot with all the changes I suggested in 1. and 2. However, in order to keep backward compatibility give the option with a flag to use the old-style e.g. -fnodot then the compiler assumes percentage symbol for OOP along with all other styles that were valid before. The only restriction should be that you can’t have a mixed style code.
Note1: I am no expert when it comes to such technical details, therefore excuse my ignorance if what I am suggesting makes no sense.
Note2: Having said all these, I still consider it a minor issue compared to other features that are missing altogether.