3 ms·
I think this opens up the possibilities for Swift to be used as a web language, not just a iOS language. I have to say, Swift syntax is very similar to PHP 7. I
by cdnsteve 11y ago
I think this opens up the possibilities for Swift to be used as a web language, not just a iOS language. I have to say, Swift syntax is very similar to PHP 7. Interesting times for sure. I'll be keeping a close eye on Swift in terms of its adoption as a web language.
- EugeneOZ 11y agoThere is full http server: https://github.com/glock45/swifter https://github.com/glock45/swifter
- hundchenkatze 11y agoHere's a full blown application server as well. https://github.com/PerfectlySoft/Perfect https://github.com/PerfectlySoft/Perfect
- pbreit 11y agoIn that sense, would you be comparing Swift to Go, Python/Ruby, JavaScript, PHP? Is Swift "better" than the others?
- cballard 11y agoSwift has a passable type system, support for generics, and doesn't use a VM. Tooling support isn't there for Linux currently, so the act of writing code isn't much better than Python (no Xcode-type autocompletion), but once you want to run it, the compiler will scream at you if you pass ducks where penguins are expected - while still allowing you to reason about swimming birds in general.
- EugeneOZ 11y agoSwift has nothing similar to PHP 7. Typing in PHP 7 is ridiculous - you can set "Array" as a "strict" type of return value, but inside that array you can have whole universe. And any optional type system is not a type system at all. I learned it when tried Dart. PHP 7 is too primitive in comparison with Swift.