• 0 Posts
  • 8 Comments
Joined 1 year ago
cake
Cake day: July 4th, 2023

help-circle

  • Many of these meanings seem to be captured in some modern solutions already:

    • We plan to provide a value, but memory for this value hasn’t been allocated yet.
    • The memory has been allocated, but we haven’t attempted to compute/retrieve the proper value yet
    • We are in the process of computing/retrieving the value

    Futures?

    • There was a code-level problem computing/retrieving the value

    Exception? Result monads? (Okay, yea, we try to avoid the m word, but bear with me there)

    • We successfully got the value, and the value is “the abstract concept of nothingness”

    An Option or Maybe monad?

    • or the value is “please use the default”
    • or the value is “please try again”

    An enumeration of return types would seem to solve this problem. I can picture doing this in Rust.


  • 2 things I like about golang is just 1) the ease of getting someone to start work, and 2) goroutines. I have no complains about goroutines cause I’ve barely used it, and when I do it’s been fine. The first point though, I’d say the simplicity of the language is a double-edged sword — it’s easy to learn with little surface to cover, but it forces you to implement a lot of basic machinery you find in other languages by yourself, and so your codebase can get clunky to read really quickly, especially as your project grows.

    Not trying to dissuade you from learning golang tho. I think it’s a good language to learn and use, especially for small simple programs, but it’s not the great language many try to say it is. It’s… fine. There are many reasons why it grinds my gears, but I’m still fine with using it and maintaining it for prod.


  • Badland9085@lemm.eetoProgrammer Humor@lemmy.mlIn case you forgot.
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    9 months ago

    Ehhh, golang’s pretty down there for me too. Sure, you have types, but the way you “implement” an interface is the sussiest thing I’ve seen in most well-known programming languages. Not to mention all the foot guns (pointers for nullables is a common one, and oh, if you forgot that a function returns an error, and you called it for its effects, you’ve just built a possibly very silent bomb) you end up building into your programs. I use in prod, and I get scared.





  • The fact that Reddit can still tell you that the user deleted their account is proof that not all of that user’s data in their systems are deleted. It may just be a flag in an account that marks them as “deleted”, and so whenever data about that account is being retrieved, their API server will look at that flag, and tell the recipient that the account is “deleted”. People in the software industry calls this “soft deletion”.