複製鏈接
請複製以下鏈接發送給好友

F#

鎖定
F#是一種通用的編程語言,用於編寫簡潔、可靠的高性能代碼。通過F#,可以編寫整潔的自我記錄代碼,重點仍是問題域,而不在於編程細節。它在不影響速度和兼容性的情況下做到這一點 - 它是開源的、跨平台的和可互操作的。 [2] 
軟件名稱
F#
軟件平台
.NET [3] 
上線時間
2005年
最近更新時間
2022年11月30日 [6] 
軟件語言
F#
開發商
microsoft
軟件授權
microsoft
軟件版本
F# 6 [6] 

F#發展歷程

F#讀做 "F sharp",中文譯音暫時沒有。專業人士一般讀"F sharp",現在很多非專業一般讀"F井"。雖然不專業,但是十分容易理解。
F#自2002年開始研發,2005年發佈了第一個版本,2007年底正式從研發專案轉移至產品部門,並決定將F#置入Visual Studio 2010。截止目前(2015年4月7日現在),最新的F#為F# 4.0 [1]  。搭載於Visual Studio 2015中。

F#主要功能

微軟計劃將慢慢整合F#至.NET平台並使F#成為.NET平台的計算輔助語言。F#是一種函數型程序設計(FP,Functional Programming)語言。然而F#對IP(Imperative Programming)與OOP(Object Oriented Programming)的支持幾乎一樣的出色。
F#也許終將成為程序核心數據多線程處理的首選,而C#VB等將在用户界面交互設計方面繼續發揮其強大的潛力。
F# 在數據科學機器學習方面表現出色。 [4] 
F# 適用於構建高效、可縮放、可靠的Web解決方案。 [5] 

F#版本記錄

  • F# 6
  • F# 5
  • F# 4.7
  • F# 4.6
  • F# 4.5 [6] 

F#代碼示例

代碼示例:F# Hello World 程序
(* This is commented *)
(* Sample hello world program *)
printfn "Hello World!"

#light
(* Sample Windows Forms Program *)
(* We need to open the Windows Forms library *)
open System.Windows.Forms
(* Create a window and set a few properties *)
let form = new Form(Visible=true, TopMost=true, Text="Welcome to F#")
(* Create a label to show some text in the form *)
let label =
let temp = new Label()
let x = 3 + (4 * 5)
(* Set the value of the Text*)
temp.Text <- sprintf "x = %d" x
(* Remember to return a value! *)
temp
(* Add the label to the form *)
do form.Controls.Add(label)
(* Finally, run the form *)
[<STAThread>]
do Application.Run(form)

參考資料