Live data from Hacker News

Ask HN: Should I learn Swift?

news.ycombinator.com

1–8 of 8 posts

Re: Ask HN: Should I learn Swift?

#3
Swift outside of Apple is a long bet for now. It's just been open sourced and it competes with other languages in a crowded market.

As siscia said, you should probably pick a language that will teach you new things. Especially if you aren't hurting and in need of a marketable skill now. The investment will be worth more than just putting another similar language on your list. Why? Because you will learn to see things from a different angle and maybe tackle problems in more efficient ways.

Re: Ask HN: Should I learn Swift?

#5
post #4

Maybe one language from each "family": Rust, Haskell, Prolog, Lisp, Erlang.

I like this comment a lot because it resonates with what I think I could stand to benefit from learning multiple paradigms, i.e. learning what to apply to what type of problem. Can you expound maybe a paragraph or so as to what each "family" has to offer, in your personal experience?

Re: Ask HN: Should I learn Swift?

#6
post #5
post #4

Maybe one language from each "family": Rust, Haskell, Prolog, Lisp, Erlang.

I like this comment a lot because it resonates with what I think I could stand to benefit from learning multiple paradigms, i.e. learning what to apply to what type of problem. Can you expound maybe a paragraph or so as to what each "family" has to offer, in your personal experience?

I've learnt C/C++ (same category as Rust) & Haskell & Lisp, and I've had an epiphany with each of those, that significantly shaped my programming ability today. I have not yet learnt Prolog or Erlang.

Rust is in the same category as C - just better designed. If the OP wanted to learn a compiled, low level language, to learn the paradigm, I'd suggest Rust for minimised frustration. C/Rust has minimal static type checking system, is performant and low level, compiles to machine code. They are both imperative languages that map relatively close with the underlying assembly.

Haskell has a much more sophisticated type system that integrates closely with the rest of the language, e.g. pattern matching. I don't know how to describe it in detail without resorting to Haskell jargon. The difference between the type system of Haskell and Java/C is as big as the difference between Java and a language without class/types. I think I "got it" in the 4th of my 8 month honours thesis, written in Haskell. You know about Java's classes and interfaces? They're human constructs, like a set of paintings by the same author. You could put them in different arrangements but you're sort of limited in what arrangements you can put in. Imagine if those type ideas were distilled to a mathematical definition with some sort of axis (like the real number maths where you can intertwine +, -, *, % operators), that are building blocks which can build on itself, then you have the Haskell type system. It's a lot more "pure".

Lisp's type system is akin to Python's, it doesn't really check until runtime. The biggest difference between Lisp and Python it's meta programming abilities. Have you heard about C macros? Imagine a language where it's macro language is the language itself. You could write your own language constructs, operators, etc. That's Lisp.

Re: Ask HN: Should I learn Swift?

#7
post #6
post #5

Earlier quoted context omitted.

I like this comment a lot because it resonates with what I think I could stand to benefit from learning multiple paradigms, i.e. learning what to apply to what type of problem. Can you expound maybe a paragraph or so as to what each "family" has to offer, in your personal experience?

I've learnt C/C++ (same category as Rust) & Haskell & Lisp, and I've had an epiphany with each of those, that significantly shaped my programming ability today. I have not yet learnt Prolog or Erlang. Rust is in the same category as C - just better designed. If the OP wanted to learn a compiled, low level language, to learn the paradigm, I'd suggest Rust for minimised frustration. C/Rust has minimal static type check…

Thanks for this! Cheers

Re: Ask HN: Should I learn Swift?

#8
So many times I've found myself jumping back and forth between new languages, trying to learn what might be the best for X field in 20XX.... Usually ending up learning very little.

Should you learn Swift? Possibly. But I'd be careful with learning for external motivators like job prospects.

I've found personal interest and wanting to build something as being the strongest motivators of learning