Live data from Hacker News

Learn Programming with OCaml

usr.lmf.cnrs.fr

71–80 of 150 posts

Re: Learn Programming with OCaml

#71

> Learn Programming with OCaml Lately, I keep asking myself, do I need to learn this new thing, should I force myself to learn this thing, LLMs know it anyways and so on. So (asking genuinely), should we learn these things?

I think it's helpful to have a deep understanding of one c-type language, one lisp, and one ML-type language. There are so many things influenced by these three language families that being comfortable with them makes it so much easier to understand a wide variety of languages and libraries.

Re: Learn Programming with OCaml

#73

OCaml is the LLM secret weapon right now. They are better at writing it than they are any other language.* That’s all I have to say about it. * Other “pure” hindley-milner languages are tied but among them ocaml has some particular strengths that I’m sure others will discuss.

For web frontend, it's derivative programming language, rescript, is also a secret weapon because of types, fast compilation times and first class support of React. Using React in rescript is much nicer than TypeScript.

Re: Learn Programming with OCaml

#74

> Learn Programming with OCaml Lately, I keep asking myself, do I need to learn this new thing, should I force myself to learn this thing, LLMs know it anyways and so on. So (asking genuinely), should we learn these things?

Yes. LLMs do not know anything, and they will make mistakes as a result. You have to be able to check their work if you wish to do a good job.

Re: Learn Programming with OCaml

#76
I believe that an ML should be the First Language for Computer Scientists. It's much less clear which language we should teach people for whom it will likely be their Only Language, today Python is common, and for fields which care about stats often R is used, I've also seen Java used in this role. But for a First Language specifically I am in no doubt that an ML should be chosen, and this is despite the fact that the University where I work has taught Java for decades and Python most recently as First Language.

I'm an old man, I learned the Standard ML of New Jersey when I was an undergraduate many years ago, but I'm pretty sure that experience though it isn't irrelevant, did not overly colour my belief in what we [speaking broadly of humanity] ought to teach.

Re: Learn Programming with OCaml

#77
post #7

Earlier quoted context omitted.

Why learn an instrument when you can just press play?

Cultural inertia: until recently, you couldn't just press play and get even a wide selection of music: for most of history, if you wanted music, you had to make it or hire someone to do it for you. More recently, you had to go to the store and buy it, which meant you didn't have much variety. Today, learning an instrument is for social status, inheriting the shine of the past, where music was rare and costly. The rea…

> The reason to learn an instrument today is because the former situation was romanticized.

Lol. The reason to learn an instrument is because it is directly pleasurable to play an instrument. You've got consumer/spectator brain.

I mean, why post a comment when you could have just read a comment?

Re: Learn Programming with OCaml

#78

Earlier quoted context omitted.

As always, it is good to be aware that many people are too anxious about more existential issues to comfortably an consistently expend effort on intellectually-taxing tasks that aren't perceived as directly related to their survival. If it's an issue with social values, it's less of one related to learning as it is to perpetuating artificial scarcity.

>to comfortably an consistently expend effort on intellectually-taxing tasks that aren't perceived as directly related to their survival. the average person spends 6(!) hours a day on their smartphone, the average TikTok user spends 100 minutes on the app alone. This isn't about artificial scarcity, it's about the average person looking like the Wall-E people

Even if those statistics are correct, I do think you're ignoring that smartphone apps are specifically engineered to be low-friction and highly-addictive, and pushed specifically to the people who are anxious about spending money on other pursuits (free time often being necessary but insufficient), as they contend with the artificial scarcity (which this is absolutely about) of affordable housing, affordable food, affordable transportation, affordable guided education, etc.

Re: Learn Programming with OCaml

#79

I do really wonder what it would be like to learn to program for the first time with OCaml. I remember learning to use OCaml in a properly functional way after so long writing code in C and it was really miserably painful trying to change how I thought about algorithms. I eventually got over the hill and it changed how I write code in C (for the better?), but I do wonder if it would have been easier to have learned O…

Being a functional programmer in a group of imperative programmers is miserable

Re: Learn Programming with OCaml

#80

> Learn Programming with OCaml Lately, I keep asking myself, do I need to learn this new thing, should I force myself to learn this thing, LLMs know it anyways and so on. So (asking genuinely), should we learn these things?

Yes. LLMs do not know anything, and they will make mistakes as a result. You have to be able to check their work if you wish to do a good job.

This isn’t really true for many programming tasks anymore. And as the saying goes, “this is the worse they will ever be”.
Post reply on HN