Skip to main content

Questions tagged [side-effects]

0 votes
1 answer
527 views

Are there any programming languages that operate solely via side-effects?

Out of curiosity I checked how Google AI would respond to a similar question. The bot seemed clever enough to understand the question, but responded that functions in this case would have no return ...
Osr Workshops's user avatar
0 votes
1 answer
195 views

Should every side-effect express mutual exclusion on its output?

I was baffled from that Haskell allows multiple concurrent tasks to print to stdout without a particular order. A code that demonstrates this (GHCi): ...
Dannyu NDos's user avatar
  • 1,485
10 votes
1 answer
719 views

How can denotational semantics be defined for imperative statements?

Denotational semantics associate each term in a program with some mathematical object representing the meaning of that term. When I see denotational semantics explained (e.g. in this answer), this is ...
kaya3's user avatar
  • 22.4k
6 votes
1 answer
300 views

LSP for a language with a lot of compile-time execution

I'm currently designing a language with a heavy focus on compile-time code execution. In particular, all types will be handled as regular compile-time values (similar to the Zig language). This ...
abel1502's user avatar
  • 2,683
6 votes
3 answers
2k views

What are the disadvantages of introducing the IO monad?

The IO monad, or the Karmic monad as what it's called in the language I'm making, is a catch-all for every side-effects. Introducing this monad has many benefits, ...
Dannyu NDos's user avatar
  • 1,485
7 votes
3 answers
315 views

What are the pros and cons of different ways of forcing resources to be closed properly?

There are various external resources, like file handles, TCP connections, and various servers, which need to be closed in some specific way before being dropped. There are a few approaches to these ...
rydwolf's user avatar
  • 4,870