Live data from Hacker News

Why Isn't Functional Programming the Norm? [video]

youtube.com

51–60 of 417 posts

Re: Why Isn't Functional Programming the Norm? [video]

#51
post #28

Earlier quoted context omitted.

but now that you've written the cake baking data type, with a little small tweak, you've got a bread baking data type.

I'll find it more intuitive to do both as an imperative series of steps. Some of my friends are in love with FP. I am not. I've done more FP than most, I can work with it, but my brain has never become in tune with it. I can bang out my intent as imperative code in real time, but with FP I have to stop and think to translate. FP also means that I can't always easily tell the runtime complexity of what I'm writing and…

Do you think of types and transformations between types when you write imperative code?

I mean usually the problem in FP is that you simply can't type mutation (you'd have to use dependent types and so on), okay, so use immutability, great, but then every "step" is just some franken-type-partial-whatever. And TypeScript has great support for these (first of all it infers a lot, but you can use nice type combinators to safeguard that you get what you wanted).

I don't like pure FP exactly because of this, because many times you have to use some very complicated constellation of concepts to be able to represent a specific data flow / computation / transformation / data structure. Whereas in TS / Scala you just have a nice escape hatch.

Re: Why Isn't Functional Programming the Norm? [video]

#52
post #37
post #24

Earlier quoted context omitted.

The fact to he took the time to do that shows who the real man-child is

The fact that it's the only site I've seen that demonstrates the ability to read HTTP referral headers from hacker news shows who the real hacker is...

Please. The "real hackers" are proxying their requests and sending custom headers to begin with.

Re: Why Isn't Functional Programming the Norm? [video]

#53
post #48

Earlier quoted context omitted.

Nah, just having a problem with the hug of death would be an explanation for redirecting to a polite static message saying "sorry, my site can't handle the load when HN links to it". What he has done instead is excessively diskish.

What has he done? Everyone’s commenting he doesn’t like HN but when I clicked the link everything looks fine. Serious question.

It redirects to an image with a hairy testicle and gives a low opinion of HN readers: https://web.archive.org/web/20191014203443/https://www.jwz.o...

Re: Why Isn't Functional Programming the Norm? [video]

#54
post #39

Earlier quoted context omitted.

> personally I find my brain works very much like a Turing Machine Exactly this. How baking a cake in FP looks like: * A cake is a hot cake that has been cooled on a damp tea towel, where a hot cake is a prepared cake that has been baked in a preheated oven for 30 minutes. * A preheated oven is an oven that has been heated to 175 degrees C. * A prepared cake is batter that has been poured into prepared pans, where ba…

I actually don't know of any functional programming languages that don't have syntactic and semantic support for writing step-by-step algorithms.

The same can be said about imperative languages supporting FP concepts: they have it, but it's just not the same.

Re: Why Isn't Functional Programming the Norm? [video]

#55
post #48

Earlier quoted context omitted.

Nah, just having a problem with the hug of death would be an explanation for redirecting to a polite static message saying "sorry, my site can't handle the load when HN links to it". What he has done instead is excessively diskish.

What has he done? Everyone’s commenting he doesn’t like HN but when I clicked the link everything looks fine. Serious question.

You must be using Brave or a browser plugin which doesn't send referral headers. If you use a normal browser, it displays a testicle in an egg cup with a silly phrase complaining about the demographic of HN users.

Re: Why Isn't Functional Programming the Norm? [video]

#56
post #48

Earlier quoted context omitted.

Nah, just having a problem with the hug of death would be an explanation for redirecting to a polite static message saying "sorry, my site can't handle the load when HN links to it". What he has done instead is excessively diskish.

What has he done? Everyone’s commenting he doesn’t like HN but when I clicked the link everything looks fine. Serious question.

[deleted]

Re: Why Isn't Functional Programming the Norm? [video]

#57
post #6

Richard Gabriel’s famous essay “Worse is better” ( https://www.jwz.org/doc/worse-is-better.html ) is an interesting perspective on why Lisp lost to C. In a way, the same arguments (simplicity vs consistency vs correctness vs completeness) can be made for why functional programming lost to OOP. But those philosophical perspectives aside, personally I find my brain works very much like a Turing Machine, when dealing wi…

The link you shared now leads to this when clicked on hn: https://web.archive.org/web/20191014203443/https://www.jwz.o...

When copied and pasted into next tab it leads to article.

Re: Why Isn't Functional Programming the Norm? [video]

#58
post #37
post #24

Earlier quoted context omitted.

The fact to he took the time to do that shows who the real man-child is

The fact that it's the only site I've seen that demonstrates the ability to read HTTP referral headers from hacker news shows who the real hacker is...

Not sure if serious, but looking at referral headers is commonplace and trivial

Re: Why Isn't Functional Programming the Norm? [video]

#59
post #2

JavaScript isn't a functional language itself, but you can use a functional library like lodash/fp ( https://github.com/lodash/lodash/wiki/FP-Guide ) on top of it to get all that lovely functional goodness in your frontend and node code. Using lodash/fp has made my frontend state management code a lot nicer, and I'm really only just starting out with it.

There is excellent TypeScript lib called fp-ts

Re: Why Isn't Functional Programming the Norm? [video]

#60
post #6

Richard Gabriel’s famous essay “Worse is better” ( https://www.jwz.org/doc/worse-is-better.html ) is an interesting perspective on why Lisp lost to C. In a way, the same arguments (simplicity vs consistency vs correctness vs completeness) can be made for why functional programming lost to OOP. But those philosophical perspectives aside, personally I find my brain works very much like a Turing Machine, when dealing wi…

> Apart from my code, even most of my todos are simple step-by-step instructions to achieve something.

> [...]

> This could be why OOP/Imperative was often preferred over FP.

Though this doesn't really explain why OOP is preferred over imperative (since the former doesn't really correspond to a set of step-by-step instructions).

Post reply on HN