Elektrine lite

← Feed

@LedgeDrop@lemmy.zip

Post #3197936

2026-06-08 16:55 UTC

I’ve been a long time believer that some problems are better solved via OOP, others through functional programming. The perfect language would be a successful blend of the two. Many popular OOP languages are horribly lacking on FP or it looks like an eyesore (golang, python, etc). I thought Crystal Lang (a statically type checked dialect of Ruby)… but the compile time performance and the lack of 3rd party libraries (like an aws SDK) really made it hard to use. Hearing what you said about Rust has renewed my hope. That said, I did notice that features like Coroutines have been “experimental” for nearly 9 years. I hope I’m missing something obvious, but how would you create any sort of heavy-lifting, long running, multi-session daemon/application without having some sort of asynchronous mechanism that goes beyond threading (which is limited to the number of cores the host machine is running).

Replies (3)

  • @SinTan1729@programming.dev 2026-06-08 18:41

    I don’t think there’s an std-way of doing it, but the Rust ecosystem has this thing where people usually settle around one library. In this case, it is tokio. Afaik, most async stuff is done using tokio. What little async I’ve used, it’s been using tokio or some library like actix-web that uses tokio under the hood. Also, side note, I never understood the idea of why golang is ugly. I think it’s fine, except for maybe the repeated if err != nil lines.

    Open ##3199924

  • @sudo@programming.dev 2026-06-09 00:31

    some problems are better solved via OOP, others through functional programming. The perfect language would be a successful blend of the two. That was the entire goal of Scala and I would say Scala both accomplished it and is a worse language for doing so. Some OOP principles are just bad, namely subtyping. Rust genuinely does blend OOP and Functional in a better way. Instead of classes and interfaces with lambdas you have algebraic data types and type classes with for loops.

    Open ##3206935

  • @plutopos@lemmy.zip 2026-06-09 07:31

    Threading is limited by the number of cores? Doesn’t threading just mean you create more threads, that are then managed by the OS?

    Open ##3216749