Skip to content

Comment on Why I want Swift to be your first language

Comments

The article was a reasonably persuasive argument for why Python should be your first language. Maybe someone should write "Why I want Swift to be relevant to non-Appleheads".

Except for the part where he specifically mentioned Swift's ARC as something to expose Intro students to vs. Python's garbage collection?

Isn't ARC almost exclusive to "Apple languages"? It seems like GC is much more relevant.

Not necessarily, C++11 has smart pointers which have reference counting.

- Python does not implement nullability as an ADT.

- Python does not have a type system worth mentioning.

Nullability is an interface, not a data type. Python objects can always be None, as per duck typing.

Python has a strong dynamic typing system, with metatypes, type rewriting and so on. You couldn't be more wrong. What it is missing is an easy way to declare interfaces - the idea is to use duck typing and handling exceptions when something goes wrong.

If its None, it neither looks, acts nor quacks like a duck.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.