Thank you very much. Those questions I asked before are a little different.
First of all, let me make it clear, I am not proud of asking such stupid questions at all.
Like Matthew McConaughey said in the Wolf of the Wall Street,
... not because I want to, but because I xxx need to.
Here I want to make sure the argument is exact the shape of the array that I defined.
However, are you saying Julia cannot do that?
I am sure Julia can do this but I just do not know how.
My purpose is simple, I want to be strict in defining the type and shape of the array in the argument of a function, otherwise it is easy to make mistakes here and there.
For me, the way Fortran code is written is very difficult to make such mistakes.
No I have not gone through the manual too much, but I read many reddit and stackoverflow and other forums stuff before I do Julia now, my very stupid conclusion is,
- If a Julia code looks like Python, it performs like Python; If looks like modern Fortran, it performs like modern Fortran.
- Type stability is crucial.
For an Fortran outsider, and not a very gifted programmer like me, the above statements are simple and easy to understand, and easy to implement. After all, I am using Julia to do high performance computing and get my results. I am not using it to do fancy things like plots, making videos etc. I know Julia also have many fancy macros, but I current not very familiar with them either.
I learn Julia just from a very practical aspect, and I learn it completely from scratch, I do not have any one around can help and I do not have a Julia code to begin with. Otherwise I do not even need to be here, right?
All what I have to translate now, is my own modern Fortran Monte Carlo parametric EM algorithm which I am a little proud of because probably it is the fastest/robust on the market now because I use a novel method from quantum Monte Carlo. Not because I want to translate to Julia, but because I need to. Because I need to further implement differential equation here and Julia could be a good choice.
I know if I read Julia manuals I can understand a lot, but I am just not that talented at learning Julia, and that is why I come to here. Reading a language book is a little too abstract for me. It is not like reading a physics/math book which is more straightforward.
By the way, for me, learning Julia is like playing FIFA, I do not have to play easy->ammeter->semi pro->professional->world class->legendary. I just simply begin with legendary. For me, asking you guys questions is just like playing legendary level. I can afford to fail, fail, and fail, but once I won once, and I can win more.
Again, I am sorry for stupid question, by no means I am as gifted as most of you guys, but I guess I will continue to do so. My skin is thick enough and the only thing I care is to learn something form you all and get my job done.
I know the question are stupid, I got it. But I dare to ask, so that other users might not need to ask similar question. I can afford to be a stupid guy here.
Overall, I do believe for a high performance code, Julia and modern Fortran could be similar in many ways, Again,
Not because they want to, but because they xxx need to.