Skip to content

toymachine/misc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

- create minimal photon interpreter in python
- write lexer/parser/compiler for photon in photon
- run the compiler on the interpreter to create compiled photon compiler
- functions are values/closures
- no classes just interfaces
- compile to c++
- function compile to functor class
- pratt parser for expressions
- datatypes literals directly compatible with JSON
- generators/iterators
- variable arguments
- default arguments

types
    int    (immutable, by value)
    float  (immutable, by value)
    string (immutable, by value) (also comparison by value!!)
    dict (mutable and immutable, by reference)
    list  (mutable and immutable, by reference)
    struct (mutable and immutable, by reference)
    interface (dict of name=>function or value)

A sane Java, without all the proprietary lockdown of C#, or the sheer audacious functional academic wankery that is Scala, would be my dream language. Redesign the libraries, add the basics that everyone wants: sensible first class function syntax, properties, fix generics, get rid of checked exceptions, better reflection, math operator overloading, using resource syntax. Just do that without getting in the way of what makes Java popular and you have a winner

json literal syntax (dict, list, int, string, bool)

About

miscellanious stuff

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published