10 ms·
One polymorphic version, like OCaml or Haskell, not specializing like C++ or Rust. The compiler can and does specialize functions as an optimization, but that'
by dbaupp 9y ago
One polymorphic version, like OCaml or Haskell, not specializing like C++ or Rust.
The compiler can and does specialize functions as an optimization, but that's not necessary nor part of the semantic model.
- ngrilly 9y agoI always thought that generating one polymorphic version would be a better fit for Go than generating multiple specialized versions. It's interesting that Swift adopted this approach and confirms what you said earlier about Swift having essentially the same constraints as Go and being a good source of inspiration of Go. What's the status of Swift on Linux, to write web services and connect to databases?
- dbaupp 9y agoThere's lots of testing for Swift on Linux (e.g. every pull request runs tests on macOS and Linux), and Apple recently announced https://github.com/apple/swift-nio https://github.com/apple/swift-nio which seems to have been very well received, e.g. the Vapor framework is completely switching to it for Vapor 3.
- ngrilly 9y agoThanks for the link. Does Swift provide something similar to goroutines?