• 4 Posts
  • 497 Comments
Joined 4 years ago
cake
Cake day: May 31st, 2020

help-circle






  • I mean, that is more obvious and more readable.

    But what I really don’t like about it, is that it’s less clear to what it applies. For example:

    not list.isEmpty() and x > 3
    

    Is that not (a and b) or (not a) and b?
    Obviously, you can define precedence rules, like there also is for !, but that’s again just additional things to learn.
    I’m definitely not generally opposed to special characters. I do also hate significant whitespace, because I find that less readable than braces.


  • For me, it’s pretty much the opposite. With the exclamation mark, I’ll see the inversion, then I’ll read the actual condition and try to make sense of it, and then I’ll remember that this thing was supposed to be inverted. Or I won’t remember, that’s unfortunately also a possibility.

    Might just be what we’re used to, though. I have been working in a codebase with mostly .not() for the past year.


  • Ephera@lemmy.mltoProgrammer Humor@programming.devNot
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    3 days ago

    Oh, I know where it came from. That’s also why we have all kinds of maths operators in the syntax of virtually any programming language. Because back when we didn’t yet know where this programming thing was going, we just threw in the conventions of maths and theoretical logic.

    What I’m saying is that we have our own conventions now, i.e. objects and methods, so I think, it’s worth reconsidering whether we still want to have these old conventions that are special cases in the syntax.




  • I don’t think, there’s a special trick to making them. You can look at existing kaomoji lists and pick out individual symbols to create the shape that you want.

    Or you can combine kamojis. For example, maybe you want a cat handing over a flower, but you want it to look sad, like an apology.

    Then you find a sad cat kaomoji:

    /ᐠ • ˕ •マ
    

    And combine it with the kaomoji you posted:

    ⠀/\__/\
     (• ˕ •)    
    / >🌷< \
    

    Well, could be better, but just as an example. Combining different faces and arm shapes and such is relatively easy.

    As for managing them, I usually see tags assigned to them. On the webpage that you posted, it’s the little text boxes below the kaomoji.
    But in its simplest form, you could have a text document and just write a few words above each kaomoji, like e.g. “sad cat flower”. Then if you search the text document with Ctrl+F for “cat”, this will be one of the results.







  • For example Rust needs to be able to dynamically allocate memory for all of its syntax to be intact.

    Hmm, you got an example of what you mean?

    Rust can be used without allocations, as is for example commonly done with embedded.
    That does mean, you can’t use dynamically sized types, like String, Vec and PathBuf, but I wouldn’t consider those part of the syntax, they’re rather in the std lib…