This weekend, I can finally sit down and do what I have promised to do over the past year: I started to apply F #. This experience is quite interesting. For the first time in more than a decade, I can't just sit and look at some sample code to understand a language.
This experience reinforces the currently unfortunate situation of general programming languages. Indeed, I have complained many times about the mediocrity of VB. NET, C #, Java and other languages. However, understanding what I did has a significant impact on my way of thinking, which aroused my strong interest.
I first met a function programming language when I was using edscheme in grade 11. Although the syntax of F # is quite different from that of edscheme (edscheme is a version of scheme and a term of Lisp; F # is based on ocaml), many of them share the same principle, especially in terms of the concept that "tag" is relative to "value.
In function programming languages, there is a tendency to avoid (or completely disable) the concept of "value. Instead, each identifier is actually used as a tag to reference a special function.
For example, "Let X = 5 + Y" does not set the value of X to be equal to the value of Y plus 5. On the contrary, X is a function. After calling it, it calculates 5 + Y and returns the result. As you can see, this way of thinking is totally different from the process code we most people learn.
Note: I have included object-oriented (OO) code in the "Process Code field", because at the most primitive and low level, every OO program ends with a very traditional and procedural thinking process. In other words, oo is just a very good and organized way to access and write process code.
Let alone that. I found my thinking hard to accept some concepts. Sadly, I used to understand this situation. It is not just because I am a little dull or lacks practice that I find it hard to accept the F # thinking method.
Imagine that if you ride a bicycle, but because you have been driving a car for 15 years, your feet are always involuntarily stretched out to the accelerator. The situation you said is similar to that.
This reminds me of my conversation a few months ago. I talked to a programmer who visited the United States in India. He and I are quite familiar with each other. He has been a programmer for quite a while and may be as long as I have. He talked to me about education.
As we all know, India, China, and many other countries far surpass the United States in mathematics education. So I asked him how to teach mathematics in India. My problem left him very confused. It seems that there are other ways to study mathematics, and this is the first time he heard about it.
"From books, through examples on the blackboard (learning mathematics); is there any other way ?" I asked him about the usage of calculators and computers. These two tools are widely used in Mathematics Education in the United States.
He explained to me that calculators are not allowed in India's high school; the University also only allows the use of calculators for basic calculations (such as addition, subtraction, multiplication, division, exponent, square root, logarithm, and natural logarithm); they oppose the use of calculators even to the following extent: using a calculator may lead to ridicule and humiliation.
It sounds totally different from the educational environment in the United States. In the United States, schools now require seventh-grade students to own T1-85-a calculator that may be more powerful than cruise missile navigation systems.
All of this comes from the basic way of thinking. Writing code (and writing code well) requires some kind of thinking ability. My many experiences have proved that it is difficult to change once a certain way of thinking is determined. For f #, the way of thinking that I can easily learn when I have little experience has become difficult because of my rich experience.
A loose house is built on the solid thinking foundation of excellent early education. If I want to build a beautiful new house, it must be destroyed. But if I demolish this dangerous building, at least I still have a solid foundation, clean water wells and complete plumbing equipment.
Those who attempt to build a loose house on a soft foundation will have serious problems. This is why I am so concerned about general education.
I know that I can learn F #. Although my learning process is much more difficult than ordinary people, it is still very likely to learn. I just need to keep reminding myself of the function language running mechanism, so there is no problem.
But for those who lack that experience, how can they learn it if they lack the basic foundation of thinking? I am confused about this. Is learning about a function programming language a prerequisite for programmers? Of course not.
Many excellent programmers have not been familiar with function programming languages. However, the way of thinking learned from this experience is extremely valuable. I know that my edscheme learning experience is of great benefit to me as a good programmer, even though I have been stuck in the "General OO language" for a while.
So after talking with friends in India, I felt very worried. In my opinion, schools in India, China, and many other countries seem to provide excellent basic education for their students.
I watched my siblings learn "Mathematics ", I don't want my children to accept this bad "education" (I haven't officially become a father, but I will become a father in a few days or weeks !) I like to see people receive the best education. The mathematical foundation of computers and advanced calculators cannot make you a good programmer.
I think it is time to return to the basic theory once I complete this F # Experience (I want to learn more to evaluate its adaptability in real programming. A few weeks ago, a reader recommended several books for ER Tufte. I think I should start with this.
In my current task, my own programming work has been minimized. I need to review my programming principles and try to do my best.
Source: http://www.builder.com.cn/2007/0601/405708.shtml