Live data from Hacker News

Vapor: a type-safe web framework for Swift

github.com

1–10 of 76 posts

Re: Vapor: a type-safe web framework for Swift

#3
Is there documentation I'm missing? Based just on the readme I don't think I understand how this works. For instance, the section on the Request object omits HTTP headers, then the Async section shows sending response headers manually. But they're sent asynchronously for some reason? There's a .Hash method that apparently does SHA-1 hashing, though I don't know why. At the point I stopped reading because I didn't understand what the examples were telling me.

I don't mean to be negative or try to poke holes in your hard work. I'd just like to know how to use it. "Insanely fast, beautiful syntax, type safe" are super alluring features! But let me know how I can build a real application with it.

Re: Vapor: a type-safe web framework for Swift

#10

I'll admit my total naivete up front: isn't Swift already a typed language? Is there something about being a web framework that necessitates some other kind of type safety?

The more advanced a type system is, the more it depends on what you do with it when designing an API. A well designed API in a language with a rich, expressive type system can make higher-level guarantees. On the opposite side of the spectrum you could just use Strings for most of the types (it’s web after all!) and it would still be type safe, although the type guarantees wouldn’t be of much use.
Post reply on HN