Git Product home page Git Product logo

predep-old's Introduction

Predep Language

This is an experimental language to show a proof-of-concept that a dependently typed language can be imperitive while also incurring no runtime-overhead

The backend is in LLVM, so it will compile directly to assembly, and without a garbage collector.

We plan to eventually move to the official Dep language once most of the language specification has been worked out. Some features are still up in the air. For instance, we would like to require move semantics a la Rust, but we may end up just going to non-nullable types a la Kotlin.

predep-old's People

Contributors

andrewhu-uw avatar

Watchers

James Cloos avatar

predep-old's Issues

Add boolean expressions

Right now we have the true and false keywords reserved, but they won't parse into an expression

Plan to create library/package manager

I think any modern language aiming for success needs a package manager.

I thought of a clever name for it: “Loy”

As in dep... loy

Haha oh god I’m not funny

Allow multi-character operators

Right now I believe we only support operators with one character. Obviously there can be multi character operators like && or ->

Return types

Right now the return types of our functions are ambiguous

Note, this will actually require parsing of multi-character operators #2 for ->

Right now we're just doing parsing, but once we get into semantics obviously we'll have to check that a void function cannot be used as an expression

Create type checker

We can use the symbol table to verify that operators and assignments are using valid types. This may be broken down into several other issues later

Better expect messages

Right now are expect error messages say what key was found versus what was expected, but using the integer values of the enums, so it's completely unreadable

Allow Lexer to take a custom stream

Right now the Lexer only takes input from stdin, but I'd like you to be able to embed it in a program other than an interpreter, like an IDE where it could be fed custom lines.

Also, there should be a reset method on the Lexer that allows you to clear the "chambered" currTok, so that if you're doing a bunch of short queries, you're sure that they are treated separately. That, or make all of the maps static and then just destruct the instance. Actually, on second thought this is a much better idea, I'll do this if I get time.

Add Semantic Checks

I think that this can be implemented by integrating it into the parser, so when a statement is successfully parsed, you just get the AST like before, but now we guarantee that this is a semantically valid statement.

This would mean that the parser would own the symbol tables and that sounds... not right, but hey I'm not a compiler expert

If we run into an error, we log the error and return null

Create statements

We need to be able to express the idea of a statement, i.e. a command that does something, not just representing a value.

Mainly, we need to be able to define new variables

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.