Files
Matsuura Tomoya(Windows) 3215e1d36e
All checks were successful
Build / build (push) Successful in 12m58s
[obsidian] vault backup: 2025-08-23 00:07:56
2025-08-23 00:07:56 +09:00

20 lines
917 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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> })
```