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

Consider Algebraic-Effects supporting? #7

Open

Description

@Lucifier129

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.

Activity

  1. added
    enhancement
    on Feb 17, 2022
  2. vincentdchan commented on Feb 17, 2022

    @vincentdchan
    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions