a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by rozap
rozap  ·  4130 days ago  ·  link  ·    ·  parent  ·  post: First question: Which language should I learn first?

I learned Scheme, a functional language, first. It was great because of how simple it is, so you get to focus on how to program rather than learning the syntax and oddities of a single language. I more or less took this course but it was In real life. Gregor is a fantastic teacher, and the topics in the course are high level and it covers a lot if stuff.

Anyway, if you learn the concepts in one language, picking up more languages is trivial.





wildptr  ·  4130 days ago  ·  link  ·  

I'd learn Haskell too, if you're not into parenthesis.

user-inactivated  ·  4125 days ago  ·  link  ·  

I didn't like Haskell's syntax and it's too pure. Everyone knows that to get anything done, you need imperative-ness somewhere, that's where monads come from, but it's ridiculous. I like OCaml better as a statically typed functional programming language that takes the ideas of functional programming but leaves some imperative programming for when you need it.

wildptr  ·  4125 days ago  ·  link  ·  

Actually, I've been trying to learn Haskell for sometime, but I just can't wrap my head around the purity. Can you recommend a language(s) for me that combines functional and imperative paradigms?

user-inactivated  ·  4118 days ago  ·  link  ·  

JavaScript (sorta), OCaml (though like I said, it's statically typed), Scheme and the Lisps (seems like you aren't a fan of parens, I don't mind them (as you might be able to tell))

Unfortunately, that's it. All the combinations of imperative and functional paradigms that exist are leaning on the imperative side, and there are few mostly functional and partially imperative languages, imo. Try OCaml, it's got a good mix of functional and imperative: http://try.ocamlpro.com/

BT  ·  4130 days ago  ·  link  ·  
This comment has been deleted.
user-inactivated  ·  4125 days ago  ·  link  ·  

You don't need to know lambda calculus...you already have functions in C, what's hard about have an unnamed function?

rozap  ·  4121 days ago  ·  link  ·  

The lambda calculus, iirc, refers to the proof drawn up by Alonzo Church that anything can be computed through pure functions - ie: you can compute anything without mutating state.

Do you have to understand that lambda calculus to use functional languages? Hell no. I sure as shit don't understand it, and I can do functional programming. And, I would argue, that few people really understand it, even though tons of people use functional languages. So, you're right, you don't have to know it, but the lambda calculus isn't really referring to the handy lambda function...there's a lot more behind it...that you don't need to understand.