TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Very basic HTTP implementation in Swift

45 pointsby huydotnetover 9 years ago

9 comments

Matthias247over 9 years ago
Sorry - but sending a bunch of static bytes through a TCP socket without even reading something from the input is not even a basic HTTP implementation.
评论 #10679238 未加载
cdnsteveover 9 years 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.
评论 #10678748 未加载
评论 #10678679 未加载
评论 #10680526 未加载
评论 #10678799 未加载
Wonnk13over 9 years ago
Why is two thirds of the README dedicated to Docker? must everything be a Docker container now?
评论 #10680279 未加载
评论 #10679841 未加载
nodesocketover 9 years ago
Unrelated, but is this a common practice in Swift?<p><pre><code> #if os(Linux) import Glibc #else import Darwin.C #endif </code></pre> Feels a bit nasty.
评论 #10678959 未加载
评论 #10678937 未加载
评论 #10678990 未加载
评论 #10679120 未加载
nodesocketover 9 years ago
Interesting to see if an Express like framework comes about. Does it even make sense to write a backend http RESTful API in Swift? Wonder what the performance is vs node.js and go?
评论 #10678877 未加载
评论 #10678832 未加载
评论 #10679728 未加载
EugeneOZover 9 years ago
I don&#x27;t think Swift is a very good choice for the web - we already have much better options. Swift compiler don&#x27;t care about memory leaks, runtime errors and race conditions. And it&#x27;s really easy to get runtime error - just unwrap optional value without check.<p>So I think Swift is good for something what can run few minutes and be restarted easily in case of failure - mobile and desktop apps. Not web server daemons.
pkalerover 9 years ago
Aeon is an HTTP server written in Swift that has an API that looks like Sinatra. <a href="https:&#x2F;&#x2F;github.com&#x2F;Zewo&#x2F;Aeon" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Zewo&#x2F;Aeon</a>
srameshcover 9 years ago
How mature is Swift for writing backend applications in its current state when compared to Python or maybe Rust ?
评论 #10678954 未加载
andomaover 9 years ago
Oh, this is so cute...