Skip to content

Roadmap #6

Open
Open

Description

@mkhan45

To start out with, we want

Eventually it would be cool to have:

  • An AST optimization pass
    • Function inlining
    • Convert atoms to ints added atoms #27
    • Convert idents to ints (should be a ~25% perf boost) (ad4b298)
    • Inline simple assignments to an existing variable, or assignments which are only used once
  • A pipe operator (b011436)
    • Function Captures
  • A module/import system with multiple file support
  • A web server module in the stdlib
  • Records/named tuples
  • Macros
  • Named/optional arguments?

Activity

  1. mkhan45 commented on Oct 20, 2021

    @mkhan45
    OwnerAuthor

    named/optional arguments seem unnecessary since we can just use a map as an argument with pattern matching, but maybe there could be some syntax sugar

  2. mkhan45 commented on Oct 21, 2021

    @mkhan45
    OwnerAuthor

    We also need proper error messages, to start out we'd have to revamp the scanner so that we can pass line number and maybe column information to the parser

  3. mkhan45 commented on Oct 21, 2021

    @mkhan45
    OwnerAuthor

    records/named tuples might also be unneeded with maps

  4. mkhan45 commented on Oct 23, 2021

    @mkhan45
    OwnerAuthor

    I've considered it don't think we should have variadic lambdas anymore. They're significantly slower than just having multiple functions unless we implement it as syntax sugar, which has other problems. Since we have a match expression already it also seems a bit excessive and doesn't work well with the let name = fn(args) => expr syntax

  5. WilliamRagstad commented on Oct 25, 2021

    @WilliamRagstad
    Collaborator

    We also want the interactive REPL to not crash when an error occurs, but keep the previous state.

  6. mkhan45 commented on Oct 25, 2021

    @mkhan45
    OwnerAuthor

    I've made #22 for that

  7. mkhan45 commented on Nov 5, 2021

    @mkhan45
    OwnerAuthor

    currying might cause hard to debug errors, since error reporting is pretty minimal right now

  8. mkhan45 commented on Nov 6, 2021

    @mkhan45
    OwnerAuthor

    Inlining functions at preprocess time might be impossible since little is known about the functions called. However, it might be possible at runtime on a block by block basis

    edit: alternatively, we could add an inline keyword

    could also mark a function body as inlineable at definition time, and then actually in-line it at call time

  9. mkhan45 commented on Nov 6, 2021

    @mkhan45
    OwnerAuthor

    it might be possible to make a non tail recursive function tail recursive via ast transformation to use an accumulator in simple cases or by adding a stack accumulator in more complicated ones

    edit: https://en.wikipedia.org/wiki/Continuation-passing_style

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions