Skip to main content

Questions tagged [side-effects]

Filter by
Sorted by
Tagged with
10 votes
1 answer
623 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
  • 20.8k
6 votes
1 answer
235 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,595
6 votes
3 answers
1k 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
7 votes
3 answers
225 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,582