Skip to content

Commit d166759

Browse files
authored
Update README.md for public repo
1 parent 6004cab commit d166759

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# PonieScript
22
PonieScript is the scripting language for [PonyGame](https://github.com/HoneyPony/ponygame). It is statically typed, AOT compiled (to C), and designed to be usable for game scripting.
33

4-
The fundamental philosophy of PonieScript is that C itself--with some well tuned macros and APIs--is "almost good enough" for game scripting, but not quite. PonieScript is therefore intended to be semantically dependent on C,
5-
at least for the foreseeable future -- that is, it is philosophically a C preprocessor that is just "a little complicated."
4+
The original philosophy of PonieScript is that C itself--with some well tuned macros and APIs--is "almost good enough" for game scripting, but not quite. PonieScript is therefore intended to be semantically dependent on C,
5+
at least for the foreseeable future--that is, it is philosophically a C preprocessor that is just "a little complicated." PonieScript has diverged a bit from this philosophy by now but it is still somewhat relevant.
66

7-
That said, although it is semantically dependent on C, a core goal is to make the semantics of PonieScript quite precise. That is,
7+
Although PonieScript is semantically dependent on C, a core goal is to make the semantics of PonieScript quite precise. That is,
88
correctness (of the compiler implementation) is more important than speed (of the compiled code).
99

10+
## WORK IN PROGRESS
11+
12+
PonieScript is currently a heavy work in progress. There are many compiler bugs and limitations at this time. It is slowly converging on a working product.
13+
1014
## Build process
1115

1216
Right now, PonieScript cannot actually be used with PonyGame. It is currently heavily in development. It can still be used standalone, although not very usefully at the moment. The PonieScript compiler is written in Rust so compiling should
@@ -49,19 +53,21 @@ fun init() {
4953
}
5054
```
5155
52-
And a closure example:
56+
Here is an example showing a little bit about classes:
5357
```c
54-
fun make_printer(message: StrConst) -> fun() {
55-
return fun() {
56-
print(message);
58+
class Pony {
59+
var greeting = "neigh";
60+
61+
fun greet() {
62+
print(greeting);
5763
}
5864
}
5965
6066
fun init() {
61-
var hello = make_printer("hello");
62-
var world = make_printer("world");
67+
var pony0 = new Pony{};
68+
var pony1 = new Pony { greeting: "good afternoon" };
6369
64-
hello();
65-
world();
70+
pony0.greet();
71+
pony1.greet();
6672
}
6773
```

0 commit comments

Comments
 (0)