News for hackers. Stuff that matters.
Re:Show HN: Javalin 1.0 – A Kotlin/Java web framework by hota_mazi on Tuesday November 07, 2017 @01:09PM (#15645846)
> though I wish you could re-open 3rd party classes to make them conform to additional interfaces which you can do with Swift protocols.

Mmmh really? I just reread the Protocol section of the Swift documentation and I didn't find this.

If I have a class I can't modify and that doesn't conform to protocol `Foo`, can I make it conform to that protocol?

A similar feature is being considered for Kotlin since this opens up all kinds of interesting mechanisms (notably, ad hoc polymorphism) but I don't see how to do that in Swift right now.

Re:Show HN: Javalin 1.0 – A Kotlin/Java web framework by faical on Tuesday November 07, 2017 @01:21PM (#15645976)
> If I have a class I can't modify and that doesn't conform to protocol `Foo`, can I make it conform to that protocol?

Yes, you can.

Re:Show HN: Javalin 1.0 – A Kotlin/Java web framework by fauigerzigerk on Tuesday November 07, 2017 @03:25PM (#15647196)
Not sure if that's a good thing though. I read some of the Swift standard library source code and found it very difficult to piece together all the stuff added by extensions, where they come from and where the original class definition is.

Obviously, it's going to be easier if you have written the code yourself, but what if someone else needs to read it?

Re:Show HN: Javalin 1.0 – A Kotlin/Java web framework by hota_mazi on Tuesday November 07, 2017 @09:18PM (#15649502)
Can you point to the relevant documentation section? I couldn't find it.