I'm curious what other languages are trying to achieve such?
Effect Systems vs. Print Debugging: A Pragmatic Solution
11–20 of 49 posts
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#12I wonder if this will wind up being a category of problems and the solution is a separate "system" set of effects (effectively `({user}, {system})`) or if this one-off extension is all that will be needed. Either way, extremely well explained both in motivate and implementation!
> I wonder if this will wind up being a category of problems and the solution is a separate "system" set of effects (effectively `({user}, {system})`) or if this one-off extension is all that will be needed. It already is, kinda. In my practice very often you have global singleton values that are either defined as static variables, or passed as arguments to nearly all functions in a module. Since implicit presence of…
Logging does seem like a very similar case to debugging, only that you expect to leave it on in production. On the other hand an implicit Database effect kind of defeat the point of an effect system.
I think the key is that Debug and Logger effects don't really affect the rest of the code - if you remove all debug/log statements, the only thing that changes is the debug/log output (and slightly faster execution probably).
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#13Cool idea to "type" side effects I'm curious what other languages are trying to achieve such?
- https://koka-lang.github.io/
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#14Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#15The team can’t seem to make up its minds of the language is intended for high performance or not. They talk about the importance of purity for automatic optimizations but in the real world there’s all sorts of practical reasons for needing to debug production compiled code (eg imagine something like a browser and you’re trying to figure out some weird behavior that’s difficult to catch in a debugger but too slow to reproduce in a debug build or even not reproducible due to different timings resulting in different race conditions)
Also blaming the users of your language for your language not being able to meet their needs isn’t a good look. It suggests the language is probably attracting the wrong users or positioning itself incorrectly in the market place.
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#16Cool idea to "type" side effects I'm curious what other languages are trying to achieve such?
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#17Cool idea to "type" side effects I'm curious what other languages are trying to achieve such?
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#18Cool idea to "type" side effects I'm curious what other languages are trying to achieve such?
A few other languages are: - https://effekt-lang.org/ - https://koka-lang.github.io/ - https://www.unison-lang.org/ - https://antelang.org/
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#19> Hence, when the compiler is run in production mode, we disable the lie that allows the implicit Debug effect. As a result, using dprintln in production mode causes a compilation error. The team can’t seem to make up its minds of the language is intended for high performance or not. They talk about the importance of purity for automatic optimizations but in the real world there’s all sorts of practical reasons for n…
For systems in production, we have the `Logger` effect and associated handlers.
Re: Effect Systems vs. Print Debugging: A Pragmatic Solution
#20> Hence, when the compiler is run in production mode, we disable the lie that allows the implicit Debug effect. As a result, using dprintln in production mode causes a compilation error. The team can’t seem to make up its minds of the language is intended for high performance or not. They talk about the importance of purity for automatic optimizations but in the real world there’s all sorts of practical reasons for n…
We think that functional programmers should be able to write e.g. `List.count(x -> x > 5, l)` (or e.g. use pipelines with |>) and have it run as fast as an ordinary imperative loop with a mutable variable. The Flix compiler gives them that-- but it requires the program to undergo certain transformations that may require expressions to be moved around and eliminated. It is dangerous to perform such optimizations with…
And yes, Rust doesn’t have an effect system yet, but others have mentioned Haskell and how it handles tracing and logging and the limitations of effect systems interplaying with such things.