Re: named array
- Posted by TheresNoTime Sep 05, 2013
- 1929 views
My approach - always make clones, even if they are not needed.
Which works fine with Euphoria maps as well.
How? Replace standart "put" with "clone_and_put"?
In my particular case, this functionality is not only superfluous but also harmful.
Based on the needs that you have described so far, I disagree. It appears to be harmless. In fact, you contradict yourself on this point - Python's Dict type is also mutable (and should therefore suffer from the same disadvantages), yet you do not treat this as harmful.
We often do not understand each other because they are talking about several things at once. Security - this is one problem, and convenience - the second. In other languages (Ruby and Python) I will have to decide what is more important. In the Euphoria I have no choice because there is no security, no convenience (in my understanding of these terms).
Actually, I believe something like this has already been implemented in the alternative_literals branch: http://openeuphoria.org/ticket/657.wc
Did not see anything like what I want. Perhaps I misunderstood something.
A Russian programmer told the following story. He is working in the United States with colleagues of different nationalities. Everyone is doing their part of the program. Once his "Russian" part brought down testing. Began to understand. It turned out that the problem is in the "Chinese" part. The Chinese came and looked, and immediately began to correct. Therefore, Russian programmer saw whole process. He was in shock. A Chinese man has opened its source code. Each function has the list of options in a few screens long. The most amazing thing is that he quickly found the desired function, add a parameter in the middle of a very long list, and ... everything started to happen!
But I started to get nervous because the list of options beyond a single line! Maybe I should apply to such a noodle code quieter? Eventually, computer is steel, unlike my nerves. :)