Tweet Iāve visited the .NET Saturday organized by the Ciklum Company on May 26. I’ll tell you a little bit about my impressions. The program was really nice, exactly as the organizers warned. There were: Eugene Zharkov ā āWindows 8 Metro App: JavaScript Dark Sideā; Petr Afanasiev ā āPerfect API: ASP.NET Web API inside!ā; Sergey Koshel ā āWhen optimistic lock is not a case (.NET/SQL)ā; Vitaliy Domnikov ā āF# – To Iterate is Human, to Recurse, Divineā; Alexandr Ivanitskiy ā āXAML – a markup language for WPF, Silverlight and Metro applicationsā. In addition to the main screen, there was an additional screen installed for tweets with the CiklumNETĀ hashtag, which perfectly entertained the audience. It is a pity that I couldnāt attend all the lectures, but Vitali’s lecture on F# made a great impression on me, however, the lecture by Alexander was saved only by trolls twitting about cups, women, and dresses. So, from now on, I will visit meetups in Ciklum more frequently. Oh yes, I almost forgot. I promised to try F# and finally did it.Ā The program is the calculation of factorial of the n number. Click to toggle codeblock 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // Create function for calculating factorial let rec factorial n = match n with | 0 -> 1 | _ -> n * factorial (n - 1) // using System open System Console.Write(@"Enter n = ") let n = Convert.ToInt32(Console.ReadLine()) // Calculate and write result let result = factorial n Console.Write(@"Result = ") Console.WriteLine(result) // Create function for calculating factorial let rec factorial n = match n with | 0 -> 1 | _ -> n * factorial (n - 1) // using System open System Console.Write(@"Enter n = ") let n = Convert.ToInt32(Console.ReadLine()) // Calculate and write result let result = factorial n Console.Write(@"Result = ") Console.WriteLine(result) It is really possible to write programs on this functional language quite quickly and efficiently if you want to work with math functions. Dark side is the same: you have to think...
Read More