Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Consider Algebraic-Effects supporting? #7

Open
Lucifier129 opened this issue Feb 17, 2022 · 1 comment
Open

Consider Algebraic-Effects supporting? #7

Lucifier129 opened this issue Feb 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Lucifier129
Copy link

Lucifier129 commented Feb 17, 2022

Excellent job!

Pattern-matching and Algebraic Data Type(Discriminated Union) are really useful for writing type-safety code.

Algebraic-Effects and Handlers is another great feature that needs widely supporting for better control flow, but currently, only a few programming languages support it.

I am looking for a long time for a programming language that supports ADT/Pattern-matching, Algebraic-Effects, Typeclass/Trait. koka is the best match I have found so far. It will be very inspiring for lichenscript I think.

@vincentdchan vincentdchan added the enhancement New feature or request label Feb 17, 2022
@vincentdchan
Copy link
Collaborator

Thanks for your attention. I don't know Koka, but I know algebraic-effects in OCaml Multicore. It's powerful.

LichenScript aims to be compiled to codes as close as possible to the target platform. That's the meaning of "Lichen".
So currently, LichenScript doesn't have a feature such as try/catch (which heavily depends on the runtime on the native platform).

So if we want to support algebraic-effects, we need a method to compile it to the target platforms languages(both native/JavaScript). For example, how would algebraic-effects looks like in JavaScript? Can algebraic-effects be compiled into many lambda expressions(such as async/await)? I don't know yet. But I will keep an eye on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants