[obsidian] vault backup: 2025-08-23 00:07:56
All checks were successful
Build / build (push) Successful in 12m58s
All checks were successful
Build / build (push) Successful in 12m58s
This commit is contained in:
19
content/Koka.md
Normal file
19
content/Koka.md
Normal file
@@ -0,0 +1,19 @@
|
||||
#programming-language
|
||||
|
||||
[The Koka Programming Language](https://koka-lang.github.io/koka/doc/index.html)
|
||||
|
||||
[[MicroSoft]]のチームが研究しているプログラミング言語。
|
||||
|
||||
名前(KOKA=効果)のとおり、[[代数的エフェクト]]が明示的な組み込みシンタックスで扱える。
|
||||
|
||||
中括弧の囲みをインデントで代用できて、JSっぽくもPythonっぽくも書ける。シンタックス的に推測できれば無名関数を省略して書けたりと、かなり構文糖衣が積極的に使われている。
|
||||
|
||||
|
||||
With構文が面白い。[[Haskell]]のIOモナドで`<-`をチェーンしていくようなやつが、単に高階関数を受け取る関数の順番を入れ替える構文として実装されてるので、ネストが深くなっていくのを避けられる。
|
||||
|
||||
```koka
|
||||
with x <- f(e1,...,eN)
|
||||
<body>
|
||||
//equal to
|
||||
f(e1,...,eN, fn(){ <body> })
|
||||
```
|
Reference in New Issue
Block a user