kellysmith12.21
2020-12-9 05:02:13

Does anyone know of work done on effect systems or effect management in a dynamically typed language?


samth
2020-12-9 05:09:12

What would that mean?


notjack
2020-12-9 05:25:24

cc @rokitna ^ (related to your interests)


kellysmith12.21
2020-12-9 06:46:06

The context is that I’ve seen several statically typed languages that track side effects using types or some extension of the type system. The classic example is Haskell. Since Racket is dynamically typed, those approaches can’t be used directly, but I’ve been wondering if some of the ideas can be adapted for Racket and its idioms, especially given how expressive the contract system is.


kellysmith12.21
2020-12-9 06:51:10

It’s my understanding that, in many cases where Racket programs do use imperative features, they are limited to a small scope and hidden behind what is essentially a pure interface. My interest is being able to track situations where a procedure has visible effects (e.g. doing I/O, mutating an argument, &c.) and reflect that in contracts. The idea is not to force completely new idioms, but to encourage being explicit about what parts of a program have side effects.


kellysmith12.21
2020-12-9 06:53:27

Although, I suspect that such effect management couldn’t be added to programs without making some changes.