Elm

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(功能)
(功能)
第13行: 第13行:
  
 
Elm is also [https://elm-lang.org/blog/blazing-fast-html-round-two very fast] and [https://elm-lang.org/blog/small-assets-without-the-headache very small] when compared with [[React.js|React]], [[Angular]], Ember, etc.
 
Elm is also [https://elm-lang.org/blog/blazing-fast-html-round-two very fast] and [https://elm-lang.org/blog/small-assets-without-the-headache very small] when compared with [[React.js|React]], [[Angular]], Ember, etc.
 +
 +
==Haskell==
 +
*[https://github.com/eeue56/haskell-to-elm haskell-to-elm] 关于 Elm 与 [[Haskell]] 不同之处的例子集。
  
 
==指南==
 
==指南==

2022年2月13日 (日) 15:46的版本

Elm

目录

简介

Elm: Functional Frontend

Elm is a functional language that compiles to JavaScript.

功能

Elm 架构核心的三个概念:

  • Model — the state of your application
  • View — a way to turn your state into HTML
  • Update — a way to update your state based on messages

Elm is also very fast and very small when compared with React, Angular, Ember, etc.

Haskell

指南

Elm Cheat Sheet

$ curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
$ chmod +x elm
$ sudo mv elm /usr/local/bin/
$ elm --help
$ elm repl
---- Elm 0.19.1 ----------------------------------------------------------------
Say :help for help and :exit to exit! More at <https://elm-lang.org/0.19.1/repl>
-------------------------------------------------------------------------------
> [ "Haskell", "Elm" ]
["Haskell","Elm"] : List String
> [ 1.0, 2.1, 4.5, 43.1 ]
[1,2.1,4.5,43.1] : List Float
> String.length
<function> : String -> Int
> "hello"
"hello" : String
> not True
False : Bool
> round 3.14159
3 : Int
> greet name =
|   "Hello " ++ name ++ "!"
|   
<function> : String -> String
> greet "Huihoo"
"Hello Huihoo!" : String

软件包

项目

Awesome Elm Awesome.png

Inspired by Elm

  • elchemy Write Elixir code using statically-typed Elm-like syntax (compatible with Elm tooling)
  • Fabulous F# Functional App Development, using declarative dynamic UI
  • Elmish Elm-like abstractions for F# applications.

用户服务商

图集

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱