[HN Gopher] Koka: Strongly typed functional-style language with ...
___________________________________________________________________
Koka: Strongly typed functional-style language with effect types
and handlers
Author : nateb2022
Score : 17 points
Date : 2023-12-29 20:53 UTC (2 hours ago)
(HTM) web link (koka-lang.github.io)
(TXT) w3m dump (koka-lang.github.io)
| pharmakom wrote:
| What are the practical advantages of Koka over say "IO a" or
| "Async<'t>" in other languages?
| jitl wrote:
| Monads need to wrap each other, effects are more composable
| TheMatten wrote:
| > Monads need to wrap each other, effects are more composable
|
| It's really trickier than algebraic effects make it seem
| though. Haskell-ish "monad transfomers" as a stack of
| wrappers may pick concrete ordering of effects in advance
| (e.g. there's difference between `State<S, Result<E, T>>` and
| `Result<E, State<S, T>>`, using Rust syntax), but effect
| systems like one in Koka either have to do the same decision
| by using specific order of interpreters, or by sticking to
| single possible ordering, e.g. using one, more powerful
| monad. And then there're questions around higher order
| effects - that is, effects with operations that take
| effectful arguments - because they have to be able to "weave"
| other effects through themselves while preserving their
| behaviour, and this weaving seems to be dependent on concrete
| choice of effects, thus not being easily composable. In a
| sense, languages like Koka or Unison have to be restricted in
| some way, giving up on some types of effects. I'm not saying
| that's a bad thing though, it's still a improvement over
| having single effect (IO) or no effects at all.
| jitl wrote:
| > Effect handlers let you define advanced control abstractions,
| like exceptions, async/await, iterators, parsers, ambient state,
| or probabilistic programs, as a user library in a typed and
| composable way.
|
| > Perceus is an advanced compilation method for reference
| counting. This lets Koka compile directly to C code without
| needing a garbage collector or runtime system! This also gives
| Koka excellent performance in practice.
|
| Effectful functional language that compiles to C? Sounds great.
| dang wrote:
| Related. Others?
|
| _Koka: A fast functional programming language with algebraic
| effects_ - https://news.ycombinator.com/item?id=38421003 - Nov
| 2023 (2 comments)
|
| _The Koka Programming Language_ -
| https://news.ycombinator.com/item?id=28335043 - Aug 2021 (2
| comments)
|
| _Koka: A Functional Language with Effects_ -
| https://news.ycombinator.com/item?id=27710267 - July 2021 (12
| comments)
|
| _A Tour of Koka (an elegant programming language with Algebraic
| Effects)_ - https://news.ycombinator.com/item?id=26292411 - Feb
| 2021 (1 comment)
|
| _An Introduction to the Koka Programming Language_ -
| https://news.ycombinator.com/item?id=14647415 - June 2017 (1
| comment)
|
| _Koka - A function-oriented programming language_ -
| https://news.ycombinator.com/item?id=10131071 - Aug 2015 (10
| comments)
|
| _Koka a function oriented language with effect inference_ -
| https://news.ycombinator.com/item?id=4407415 - Aug 2012 (1
| comment)
___________________________________________________________________
(page generated 2023-12-29 23:00 UTC)