Live data from Hacker News

All programming philosophies are about state

worldofbs.com

31–40 of 254 posts

Re: All programming philosophies are about state

#32

Functional and declarative are the same to me

They are orthogonal. React (FC) is a declarative _and_ functional approach. The declarative part is where React code describes what should be rendered, instead of adding/removing DOM elements manually.

The old React is not 100% functional (partially OO), but it still is declarative.

Re: All programming philosophies are about state

#33
post #4

It's been a while but I used to enjoy telling folks in the early years of their career that software engineers and anarchists have a lot in common because both view "the state" as the main cause of problems.

Former long time anarchist, current long time FP proponent, presently having a laugh with you on this.

I bet 1 $ you work in crypto.

Re: All programming philosophies are about state

#34
post #32

Functional and declarative are the same to me

They are orthogonal. React (FC) is a declarative _and_ functional approach. The declarative part is where React code describes what should be rendered, instead of adding/removing DOM elements manually. The old React is not 100% functional (partially OO), but it still is declarative.

They're not orthogonal. I believe one is a subset of the other, but at a minimum they overlap.

Re: All programming philosophies are about state

#35

Earlier quoted context omitted.

Former long time anarchist, current long time FP proponent, presently having a laugh with you on this.

I bet 1 $ you work in crypto.

Nope! You can actually find out what I do for work pretty easily tho because it’s all open source and I use the same handle.

Edit: please donate the proceeds of your bet loss to victims of the earthquakes in Türkiye.

Re: All programming philosophies are about state

#36
post #32

Functional and declarative are the same to me

They are orthogonal. React (FC) is a declarative _and_ functional approach. The declarative part is where React code describes what should be rendered, instead of adding/removing DOM elements manually. The old React is not 100% functional (partially OO), but it still is declarative.

React is neither reactive nor declarative nor functional.

Re: All programming philosophies are about state

#37
post #32

Earlier quoted context omitted.

They are orthogonal. React (FC) is a declarative _and_ functional approach. The declarative part is where React code describes what should be rendered, instead of adding/removing DOM elements manually. The old React is not 100% functional (partially OO), but it still is declarative.

React is neither reactive nor declarative nor functional.

Instead of stonewalling, please explain what React is in your opinion.

Edit: I mean it’s called „Functional components“, are they lying?

Re: All programming philosophies are about state

#38
post #4

It's been a while but I used to enjoy telling folks in the early years of their career that software engineers and anarchists have a lot in common because both view "the state" as the main cause of problems.

Former long time anarchist, current long time FP proponent, presently having a laugh with you on this.

Out of curiosity, why former?

Re: All programming philosophies are about state

#39
post #8

That doesn't really seem like a good summary of functional programming. It has state all over the place. But it's true that functional programming is about state management. I'd argue that the functional approach to state management is to make state explicit and visible.

FP is about evaluating expressions and it doesn't have state all over the place.

I would also add that statefulness is incredibly hard and complex to get right in complex applications and pure fp languages like haskell lack enough emphasis on runtimes to handle this gracefully.

Re: All programming philosophies are about state

#40
An idea that sounds convincing at first, but falls apart on closer examination. I found myself less and less convinced with each example, some of which really seem to be grasping at straws.

Programming philosophies encompass much more than just state management, and narrowing the focus to state doesn't seem particularly enlightening to me, at least with these summaries. I'd love to be proved wrong, though.

Post reply on HN