Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iafisher/venice
A modern, high-level, statically-typed programming language
https://github.com/iafisher/venice
compiler programming-language
Last synced: 25 days ago
JSON representation
A modern, high-level, statically-typed programming language
- Host: GitHub
- URL: https://github.com/iafisher/venice
- Owner: iafisher
- License: mit
- Created: 2020-12-24T20:41:57.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-05T23:40:47.000Z (about 2 years ago)
- Last Synced: 2024-06-19T11:37:46.347Z (5 months ago)
- Topics: compiler, programming-language
- Language: Rust
- Homepage:
- Size: 1.19 MB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The Venice programming language
**NOTE**: Venice is in the early stages of development, and not yet ready for use.Venice is a modern, high-level, statically-typed programming language. It pairs the elegance and expressiveness of Python with the safety and modern language features of Rust.
```rust
import map, join from "itertools"enum Json {
JsonObject(map),
JsonArray(list),
JsonString(string),
JsonNumber(real),
JsonBoolean(bool),
JsonNull,
}func serialize_json(j: Json) -> string {
match j {
case JsonObject(obj) {
let it = ("\(key): \(serialize_json(value))" for key, value in obj);
return "{" ++ join(it, ", ") ++ "}";
}
case JsonArray(values) {
return "[" ++ join(map(values, serialize_json), ", ") ++ "]";
}
case JsonString(s) {
return s.quoted();
}
case JsonNumber(x) {
return string(x);
}
case JsonBoolean(x) {
return string(x);
}
case JsonNull {
return "null";
}
}
}
```