F # Adventure Tour (i): Choose a different way of development

Source: Internet
Author: User
Tags command line

Embark on a new journey

Each trip will be exciting, will bring a pleasant experience. Go to new places, enjoy the beautiful scenery, feel those who have nothing to do with their own people and things, body and mind will be greatly relaxed. When you come back, you will have a new feeling about where you are accustomed to live, and I wonder if you have such experience?

Learn F #, it is such a journey, after all, its philosophy and has been in contact with the c/c# and so very different. Curiosity is excited when it encounters the unknown, just as it is to embark on a new journey. Why is it called an adventure trip?

Knowledge is a time-sensitive asset, and developers on our Microsoft platform should feel it. Platforms, languages, and environments are updated quickly, updating means the depreciation of old knowledge, followed by the depreciation of the programmer (but not absolute). On the other hand, the same platform/language/environment is used for a long time, and our minds are rigid. These are not what we want to see.

We need to evaluate our knowledge and invest in it. "Investment in knowledge can always be rewarded in a good way," Franklin said, "but don't forget that investment is always accompanied by risk, which is called" adventure ".

"The programmer's Way of cultivation" suggests that at least one new language is learned every year, thinking it will help programmers expand their thinking and avoid sticking to the rules. Personally, it is good to learn different languages and understand different ways of solving problems, but at least you should have a deep understanding of a language, or you may be "proficient in everything, but not everything."

On the other hand, "the programmer's way of practicing" also suggests reading non-technical books, which may be a problem that can easily be overlooked. Remember, we are programmers, but first we are all as one.

Anyway

To understand the relationship between F # and the C # we've been in, we can look at Allen Lee's from c#3.0 to F #. To get an idea of F # quickly, take a look at both essays: F # Quick Start (i), F # fast-learning (ii).

Let's take a look at the different ways that you can choose to develop F #.

(a) Notepad

F # programs are essentially text files, so we can write them using a text editor, such as Notepad. Its file name extension is. FS, which is compiled using Fsc.exe. For example, write one of the simplest files

helloworld.fs:

#light
print_endline"HelloWorld"
read_line()

Compile the file using the command Fsc.exe Helloworld.fs, and generate the Helloworld.exe file, which will output a piece of text in the console. Note To add the path of the Fsc.exe to the environment variable.

If you take a text editor, we certainly don't use Notepad, we can adopt tools such as EditPlus or notepad++, which not only provide more powerful editing capabilities, but also add user-defined tools so that you don't have to turn on the command line every time you compile.

(ii) FSI

The F # Interactive console (F # Interactive console, FSI) uses the REPL loop mode, which is read-evaluate-print-loop. That is, enter a piece of code, compile and execute, and then output the results. It allows you to develop and test programs quickly. It can be found in the Start menu.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.