On 27/01/2024 02:10, James Kuyper wrote:
On 1/26/24 12:31, Janis Papanagnou wrote:
Try telling that to Haskell programmers :-)All side effects can be a problem (and should be avoided unless
"necessary").
Virtually everything useful that a computer program does qualifies as a
side effect. Side effects cannot be avoided, they can only be
controlled.
On 27/01/2024 20:49, Lawrence D'Oliveiro wrote:
The dirty little secret of pure-functional programming is that I/OSo the model is input - calculation - output.
cannot be treated in a purely functional fashion.
On Sat, 27 Jan 2024 16:44:28 +0100, David Brown wrote:
On 27/01/2024 02:10, James Kuyper wrote:
On 1/26/24 12:31, Janis Papanagnou wrote:Try telling that to Haskell programmers :-)
All side effects can be a problem (and should be avoided unless
"necessary").
Virtually everything useful that a computer program does qualifies as a
side effect. Side effects cannot be avoided, they can only be
controlled.
The dirty little secret of pure-functional programming is that I/O cannot
be treated in a purely functional fashion.
On 27/01/2024 21:49, Lawrence D'Oliveiro wrote:
The dirty little secret of pure-functional programming is that I/O
cannot be treated in a purely functional fashion.
It can - you just have to have the IO world as an input and an output to
your function.
On Sun, 28 Jan 2024 12:35:00 +0100, David Brown wrote:
On 27/01/2024 21:49, Lawrence D'Oliveiro wrote:
The dirty little secret of pure-functional programming is that I/O
cannot be treated in a purely functional fashion.
It can - you just have to have the IO world as an input and an output to
your function.
You mean, carry around multiple copies of the entire Universe in
individual variables?
(Facebook uses Haskell for their filters and other data handling.
On Mon, 29 Jan 2024 09:52:45 +0100, David Brown wrote:
(Facebook uses Haskell for their filters and other data handling.
I’m sure that may work OK for a filter expressed as a pure function. How does it work for one where the filter has internal state which is changed
as a result of prior input, and which alters the production of subsequent output?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 156:04:19 |
Calls: | 10,384 |
Calls today: | 1 |
Files: | 14,056 |
Messages: | 6,416,468 |