Pyli/Introduction
Top: | Pyli |
Up: | Pyli |
Prev: | Pyli |
Next: | Pyli/Unresolved Issues |
Introduction
Pyli is an experiment. I wanted to do some things with a lisp-like syntax that was incompatible with most kinds of lisp out there.
Some things I wanted to experiment with:
- Continuations like Scheme
- Basic data structures of vector and dict. (Tried Javascript numbers, but I prefer the int/long/float split for now.)
- Macros as functions that don't evaluate their parameters. (Turns out if the syntax is good enough, we don't need macros.)
I don't expect Pyli to be actually useful, except as an academic exercise for myself.
Philosophy
The overarching philosophy of Pyli is to give the programmer as much power as possible without making their task very difficult.
Some of the hardest programming tasks I've had to face are asynchronous programming and threading, so a lot of thought is going into that topic.
I want to provide a complete set of tools to allow the programmer to be productive from day one. These tools are not IDEs and such, but a complete set of useful libraries.
I want a simple syntax that can be easily remembered, yet not so simple that you have to fight with it to say anything useful.
I want to have the language take care of all the hard bits--performance, optimizing, etc... and leave the programmer to do the thinking of the interesting bits.
I want a simple yet expressive type universe. I want duck typing. I want programmers to feel free to create new types, but to limit the need for design patterns involving useless types.
I want the language to understand itself. That is, things like manipulating the stack shouldn't be rocket science. Introspection from the top to the bottom.
I want to allow the programmer to add new things to the language, ala macros. I don't want the programmer to have to think about the different phases of execution. The naive interpretation should be sufficient. (Common Lisp fails this test.)
In the end, this will be a language where language scholars will find nothing new or interesting, and a lot of things to mock, but language users will find actually useful.
Concepts
- Lists are really arrays or vectors, not cons cells.
- Syntax is very simple and lisp-like, with some rudimentary extensions.
- Simple, extensible type system.
- Types do not own methods. Methods are matched to their arguments.
- Microthreads with channels, and everything builds on this.