73 points by croottree 5 days ago | 64 comments | View on ycombinator
xigoi 5 days ago |
mapcars 5 days ago |
And I don't quite understand the memory model, is it something similar to Rust?
mauvehaus 5 days ago |
We ferment wine or beer in a different vessel with different airlock, so it does not blorp. We don't have a word for that yet.
The crock we used that birthed this word is this one:
https://www.lehmans.com/product/striped-european-style-ferme...
bobajeff 5 days ago |
cupofjoakim 5 days ago |
Perhaps it's just one point from me - not liking chaining :D
kgeist 5 days ago |
For example, a typical web service I work on:
- uses JSON APIs
- it's fully stateless (uses external DBs/caches for persistence)
- has the concepts of value objects, entities, architectural layers (app, domain, infra), ports/adapters etc.
- only entities are proper rich objects, while most of the code is stateless services that operate on requests + entities + value objects
- stateless services are composed (via interfaces) into a dependency tree (stored in the dependency container)
Currently I'm playing around with an idea for a language that makes writing things like that fast and compact to read. Something like: module my_service
layer app {
service Adder { // stateless service
uses base int // a value-based dependency, injected in the container below
method add(x int) int {
return base + x
}
}
service Doubler {
uses a Adder // delegates to another service
method double(x int) int {
return a.add(x) + a.add(x)
}
}
}
container { // dependency container construction with injections
A = Adder { base: 10 }
D = Doubler { a: A }
}
// automatically generates a web server that exposes a JSON API with method "double" and accepts the "n" argument
endpoint double(n int) int {
return D.double(n)
}
This is a synthetic example, but you get the idea (entitites and value objecst omitted here)What do you think? Does it make sense? It basically moves something usually implemented by a framework into the language, but that's the entire point: a language optimized for writing compact, architecturally safe stateless services in a few lines of code. For example, since we know a request's memory is bound to that request (no global state), we can have very optimized memory management without a full GC => improved latency. Or for example, we can have compile-time checks for things like dependency direction validation (i.e. the domain layer cannot reference the infrastructure layer) to keep the architecture clean, etc.
deterministic 4 days ago |
Almost all "new" languages presented on HN are basically slightly different flavours of languages that have been around for a very long time. But without the libraries/documentation/tools etc. needed to make it useful.
semilin 5 days ago |
This is in the very first example you see on the site. If it's a mistake, that's not encouraging. If this is actually how the language works, that's even less encouraging -- the syntax highlighter doesn't even get it right!
ramon156 5 days ago |
anentropic 5 days ago |
Looks somewhat Python-like but modernised (great!) - is it indentation sensitive?
voidUpdate 5 days ago |
lekevicius 5 days ago |
fithisux 4 days ago |
NuclearPM 5 days ago |
flintenmuschi 5 days ago |