Being the language nazi I am, I found python not to my liking. First I will state some of the things I do like just to be fair.
- Indentation instead of brackets.
- No semicolons at the end of lines.
- Very feature rich set of common functions/tasks.
- No compile times.
- An interactive console (I miss this in most languages ever since I started playing with lisp/scheme).
- Good documentation and beginners guide.
- Classes are littered with self because they aren't real classes but rather namespaces.
- Global variables have nasty names __init__, __main__ for example.
- The state of flux between 2.5, 2.6 and 3.0. Most libraries are still only usable with 2.5 and then some of the bigger ones work with 2.6 but 3.0 is "virtually" unsupported which is shame.
- Lack of type annotations when wanted, for example I would love to be able to require that functions only accept and return certain types. This is just a drawback of dynamic languages for the most part however.
- Spaces and not tabs. Why people prefer spaces over tabs alludes me, tabs allow you to move around faster with the arrow keys and allow you to setup your preferred spacing. Mixing tabs and spaces is silly however as it will never look right between different computers. (let the religious wars begin)
I decided to not take the risk and I started writing equivalent programs in other languages. I made a server in C# with async sockets and I really just didn't like the feel of it. I also made a version in C++ and boost.asio which I liked better than the C# version but I know that C++ will just lead to headaches later on and isn't a good prototyping language. Not being satisfied with either solutions I decided to re-look at some of the languages I skimmed over for one reason or another. In conclusion Scala is my next choice for prototyping a server with.
I looked over some of the beginning docs and I liked what I saw so I picked up "Programming in Scala". So far I'm only at chapter 7 however I really like the way the book is written and how material is presented. Most computer science or tech books bore the crap out of me but for whatever reason I like PinS. So what drove me to taking a look at Scala?
- The mix of function, imperative and object oriented paradigms.
- Having an actors library for concurrent processes in the same thread.
- Statically typed with type inference and the option to declare types if you want.
- Runs on the JVM and mixes well with Java (cross-platform goodness).
- Short concise programs, much like python is compared to C like languages
- The syntax is extensible and makes DSLs easy to create
- A familiar syntax without many odd operator symbols for everything.
Next time I hope to be able to post some code and my experiences with Scala.
Good to hear that you're making progress. Will be cool to see how this progresses as development continues.
ReplyDeleteBest of luck!