Introduction of F# in .net framework, what is F# how to use
Introduction of F# in .net framework:
F# is a typed functional language, by which I mean that
types of all values are determined during the compile-time.
Functional programming has long been popular with computer
scientists and academia, but pure functional languages like Lisp and Haskell
are often considered unworkable for real-world software development. One common
complaint is that functional-style code can be difficult to integrate with code
and libraries written in imperative languages like C++ and Java.
Enter F# (pronounced "F-sharp"), a Microsoft
language designed to be both functional and practical. Because F# is a
first-class language on the .Net Common Language Run time (CLR), it can access
all of the same libraries and features as other CLR languages, such as C# and
Visual Basic.
what is F# how to use:
For example, numeric data types in F# can be assigned units
of measure to aid scientific computation. F# also offers constructs to aid
asynchronous I/O, CPU palatalization, and off-loading processing to the GPU.
After a long gestation period at Microsoft Research, F# now
ships with Visual Studio 2010. Better still, in an unusual move, Microsoft has
made the F# compiler and core library available under the Apache open source
license; you can start working with it for free and even use it on Mac and
Linux systems
Key benefits of F# compared with C#
If you are already familiar with C# or Java, you might be
wondering why it would be worth learning yet another language. F# has some
major benefits which I have grouped under the following themes:
- Conciseness: F# is not cluttered up with coding "noise" such as curly brackets, semicolons and so on. You almost never have to specify the type of an object, thanks to a powerful type inference system. And it generally takes less lines of code to solve the same problem.
- Convenience: Many common programming tasks are much simpler in F#. This includes things like creating and using complex type definitions, doing list processing, comparison and equality, state machines, and much more. And because functions are first class objects, it is very easy to create powerful and reusable code by creating functions that have other functions as parameters, or that combine existing functions to create new functionality.
- Correctness: F# has a very powerful type system which prevents many common errors such as null reference exceptions. And in addition, you can often encode business logic using the type system itself, so that it is actually impossible to write incorrect code, because it is caught at compile time as a type error.
- Concurrency: F# has a number of built-in tools and libraries to help with programming systems when more than one thing at a time is happening. Asynchronous programming is directly supported, as is parallelism. F# also has a message queuing system, and excellent support for event handling and reactive programming. And because data structures are immutable by default, sharing state and avoiding locks is much easier.
- Completeness: Although it is a functional language at heart, it does support other styles which are not 100% pure, which makes it much easier to interact with the non-pure world of web sites, databases, other applications, and so on. In particular, F# is designed as a hybrid functional/OOPs language, so it can do almost everything that C# can do as well. Of course, F# integrates seamlessly with the .NET ecosystem, which gives you access to all the third party .NET libraries and tools. Finally, it is part of Visual Studio, which means you get a good editor with Intelligent support, a debugger, and many plugging for unit tests, source control, and other development tasks.
In the rest of this series of posts, I will try to
demonstrate each of these F# benefits, using standalone snippets of F# code
(and often with C# code for comparison). I'll briefly cover all the major
features of F#, including pattern matching, function composition, and
concurrent programming. By the time you have finished this series, I hope that
you will have been impressed with the power and elegance of F#, and you will be
encouraged to use it for your next project.
Other asp.net related Examples:
- On mouse over event show tooltip dropdownlist items by using C# example
- Example of Adding ToolTip for each Dropdown List Item in C#
- DropDownList Programmatically add items on Button Click in ASP.Net using C# Example
- Containing sub string in string Using JavaScript
- Display tooltip from database for dropdownlist items in asp.net c# example
- How to Add Reference of .dll file in Asp.net web site/Application
- Hide radio buttons in JavaScript on button click
- Add or bind tooltip for dropdownlist items in asp.net by C#
- How to use asp ListView control in asp.net:
- how to use Captcha in asp.net Second post
- Sending mail from web application using google Mail ID
- How to Make Data Table By C# code in Asp.net Programming:
- how to add capcha in Asp.net programming
- how to use CAPTCHA in asp.net
- Example of Crystal report(Crystal_report_in asp.net programming )
- How to Make a HTML Table by C# code in asp.net programming
- Example jQuery Validate on CheckBoxList using C#
Really only for you people who post some informative blog are really great that's to make us to gain more knowledge.Recently I got some information on some web hosting tips ,which able to know more about web hosting.
ReplyDelete