• Oro [she/they]@beehaw.org
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    1 year ago

    The whole idea of expressions is very nice, and I can’t imagine using ternary expressions anywhere after learning Rust.

    Also implicit returns ❤️

      • Oro [she/they]@beehaw.org
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Doing everything explicitly can get to be annoying, especially when it comes to what you had to do before without Vulkan’s VK_EXT_shader_object.

        It’s clear that some stuff should be implicit - most types in programming languages, for example; needing to specify a struct type and then the struct itself can be annoying - and other stuff explicit, like low level operations.

        Returns are something that usually fall into that “implicit” category. Why should I do let a = function(); return a; when I can just do function()? It’s shorter, simpler, and I don’t waste keystrokes.

      • pomodoro_longbreak@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        You get used to it pretty quickly. After a while you wonder how you ever lives without it. Explicit returns feel like ending an if with endif. The end of the conditional’s scope is implied by the end of the block by } or whatever.