This week I start a new project: the http server. My language for this project is Swift. I have been practicing the bowling kata in Swift and write a snippet of an echo server, to get up to speed with Swift. Swift feels like a hybrid of Java and Python. I love that it’s statically type, yet it’s not overwhelmingly lengthy and verbose like Java. This is how a for loop in Swift looks like:
for _ in 1…10 { // do something } Looks a lot like Python.
However, syntax is probably the most superficial thing about a language. Swift comes with features like Enums, Structs, Optionals and Closures - all of which I have yet to fully utilized. I am not yet a point where I have a deep understanding of data structures that I get excited by them. The two things that I have experienced and have a good feel for is the difference between statically type vs. dynamically type and compiled vs scripting language.
I have coded in Java, Ruby, some Python, some JavaScript and now Swift. Surely, I am no expert in any of them. But having the exposure to a variety of different types of language does raise some comparison in my mind. I always like Python very much. But Python was my very first programming language so I am probably a little biased towards it. Took me a while to adjust to JavaScript after Python, but I never feel like I know JavaScript at all, given how complicated it is and how little I worked with it. I learnt a lot by learning Java. Ruby was just… meh. Going from Java to Ruby, there was a lot more freedom. But Ruby didn’t excite me.