I have done Scala for a long time, I had a chance encounter with Spring boot and reflections like no tomorrow style of programming. It was like a wake up call. I knew why I hated the complex juggernaut of the configs and magic but man do I hate to admit, how productive I was once all that was working. Sure someday it would not work and I would need to debug in my IDE but that was rare.<p>I have lived the life of somebody who wants to have every effect annotated, still on some level I believe maybe it can be achieved someday with ergonomics. I have done a lot of rust now and when I look back, I look differently at monads and those abstractions now. Maybe I felt smart using them.<p>There is some value in being able to just look at any library and being able to understand what and how. I have done this a lot in Rust. Scala has some amazing libs and I can't deny that they were immensely powerful, it wasn't easy to make sense of it all though, forget about tweaking and making changes easily.<p>All in all I have come to realise, there is no perfect paradigm, get work done. Use what makes sense. So stop fretting over dart/go, don't bemoan Kotlin, use Scala when you can and don't worry about making everything a kliesli. And really I would not worry about my logger having a side effect. Effect systems still sound cool though, maybe someday.<p>Not worrying about programming languages and code golfing has made me a much better and productive developer, I think.
There is also <a href="https://github.com/valskalla/odin" rel="nofollow">https://github.com/valskalla/odin</a> for a pure/fp Scala logging library (also includes a slf4j bridge if you need to work with java stuff)<p>It also has some "fancy" features like changing log level if exception happens<p><a href="https://github.com/valskalla/odin#extras-conditional-logging" rel="nofollow">https://github.com/valskalla/odin#extras-conditional-logging</a><p>Though we have not yet upgraded it to Scala 3 it should work with Scala 3 just fine. (We do compile a Scala 3 release of most of the stuff but the codebase itself is mostly Scala 2 for now)
This is very exciting; one more library making use of the amazing features that come with Scala 3.<p>It's a beautiful and simple language, more so than Scala 2 and I cannot recommend it highly enough for many productive use-cases.
Can someone please explain the purpose of a logging library (woof, log4j, etc)? There must be something beyond writing text to an external file, possibly with different error levels, that I'm missing. This is a serious question. I truly do not understand what you gain by depending on an external library for this (seemingly) simple operation and would appreciate some insight. Thanks!
Having been primarily a Scala dev for the last 12 years I feel like people have slowly lost their minds over what pragmatic FP in Scala should be.<p>People are willingly recreating the Java situation of 'I don't know the project yet but I know we need Spring!' with these ridiculous libraries from Haskell zealots for no obvious benefit.<p>The ergonomics of this lib out of the box are literally worse for no reason, and worse than most other existing logging libs, because of it
I'm sorry but I don't understand <i>why</i>. It seems like this falls for the same kind of over-engineering which caused log4j's issues in the first place.<p>> Announcing Bark! A logging library written purely in C! Blazingly fast! 0 dependencies! It even prints file and line numbers!<p><pre><code> #ifdef DEBUG
#define LOG(msg, ...) printf("[__FILE__ __LINE__]: " msg, ...)
#else
#define LOG(msg, ...)
#endif</code></pre>