[swift-server-dev] Prototype of the discussed HTTP API Spec

Helge Heß me at helgehess.eu
Fri May 26 20:34:50 CDT 2017


On May 27, 2017, at 2:50 AM, Paulo Faria <paulo at zewo.io> wrote:
> I just think HTTP.HTTPRequest is quite weird (that *is* the full name of the type anyway).

Was there a discussion on the module name yet? I would assume it to be more like S3.HTTPRequest, alongside the other protocols. Or is there even an explicit module, or just an abstract API?

I think you really need to distinguish between modules (‘products’) and type names (yes, there is a overlap, but don’t abuse it).

I’m not against namespaces, but that would be

  enum HTTP {
    class Request {
      ..
    }
  }

This seems reasonable to me (apart from Swift lacking a `namespace` type which makes it look a little funny ;-). It separates the names like you desire, but still requires explicit naming unless you extend the type (in that case you can refer to the shortname).


> I'm OK with adding the prefixes if that's the consensus

It is Friday night and there about 3 opinions on that. Give it some time …


> I really think we can settle the following APIs very quickly.

That seems pretty optimistic given the past discussions. No protocols, structs, enums, etc. It may be what we end up with, but I don’t particularly like it :-) It still makes sense as a basis to go forward from.


> > Swift is still minority in server side and early user are mostly from iOS and no real complex project AFAIK had built on any of the swift web framework available yet.
> 
> I don't think this is correct.

Right. We are delivering hundreds of cows via Server Side Swift for quite a long time. That’s no easy beef!

It is a matter of fact that Swift is _tiny_ on the server side, but hey, presumably most of us are here to change that! ;-> It would be plain stupid to ignore experiences w/ other languages/frameworks and it makes more sense to look at those than at the few Swift deployments by early adaptors (yeah, no need to ignore those either).

hh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20170527/d40585ea/attachment.sig>


More information about the swift-server-dev mailing list