sauliusgrigaitis / Swifton

A Ruby on Rails inspired Web Framework for Swift that runs on Linux and OS X
MIT License
1.97k stars 69 forks source link

"static nature of swift" remark #48

Open ylluminate opened 7 years ago

ylluminate commented 7 years ago

I appreciate your frankness (and I'm sure frustration) of your remark:

IMPORTANT! We don't see any way how to make web development as great as Ruby on Rails or Django with a very static nature of current Swift. We hope that things will change at some point and we will return to active development.

Could you please expound upon this and provide more reasoning as to how (and perhaps maybe why) this is the case? Personally I'm curious about how Swift has this lock-in when compared to Crystal (albeit Crystal is modeled after Ruby and I can see somewhat the difference). I'm just hoping to see things through your eyes better after working on this so diligently as you have and to understand the walls you hit more clearly.

dziulius commented 7 years ago

Crystal has very powerful macros which allow most things that you can achieve with ruby (except that those things need to happen during compile time). While swift has no macros, so you have pretty much no dynamic features.

sauliusgrigaitis commented 7 years ago

Thanks for question @ylluminate. As @dziulius mentioned Crystal has powerful macros. Swift is a very static language.

Modern frameworks leverage on language dynamism a lot. There is simply no such dynamic features in Swift. That's the main reason we stopped to work on Swifton. Actually, there is still no framework in Swift that is considered as an alternative to popular frameworks in other languages. Even iOS development is possible in Swift only because of Objective C.

markmals commented 6 years ago

Would @dynamicMemberLookup and/or @dynamicCallable change this at all?

sauliusgrigaitis commented 6 years ago

Thanks @markmals. Yes, it's early days of dynamism in Swift. Who knows maybe one day it will be very dynamic and very convenient for web development.

WilliamDenniss commented 5 years ago

Incidentally, both those proposals have been implemented now.