https://github.com/ponylang/ponyc
Concurrent Pascal had them in 1976.
And there are plenty of other examples gaining digital dust.
Meant to write "Go allows safe concurrent access but doesn't stop unsafe concurrent access to shared data structures"
Thanks & sorry for the confusion.
Most lang/system capability models (including Go's) are open from the start -- where anyone can do anything -- and then when designing the lang/system you try to restrict access between some things at some of the time, but this gets messy fast and it's hard to get right and thus it's almost never optimal.
So rather than trying to start with an open model that's inherently flawed by definition, Pony flips the model on its head and begins from the perspective that everything is denied unless specified. You would say Pony has a deny-first capabilities model, which you can see explicitly defined here in Pony's capabilities matrix...
https://soyyomakesgames.wordpress.com/2016/10/10/ponys-capab...
And if you listen to Sylvan's talks, he is emphatic that solving the capabilities problem upfront was key that made everything else possible. All the other cool stuff you hear about in Pony like the provably correct runtime and finally achieving something approaching Hewitt's elusive Actor model that's been theoretically true for 40 years but never fully realized. Well the key to solving that mystery and unlocking the door was to take a new view on the capabilities model and building everything off that from the start.
func fanin(out chan<- int, ins ...chan int) {
switch len(ins) {
case 0:
case 1:
for msg := range ins[0] {
out <- msg
}
case 2:
for {
var msg int
select {
case msg = <-ins[0]:
case msg = <-ins[1]:
}
out <- msg
}
default:
go fanin(out, ins[:len(ins)/2]...)
go fanin(out, ins[len(ins)/2:]...)
}
}
https://play.golang.org/p/9KNkheXHUBrYou can also use reflect: https://golang.org/pkg/reflect/#Select
> goroutines are a major innovation upon threads.
Not exactly, Erlang has had them for almost three decades.