Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)S
Posts
25
Comments
115
Joined
3 yr. ago

  • Removing let-else is the whole point of the linked article series:

    Being able to do to everything Rust does, but without Rust's zoo of if-then-else, match, if-let, let-else etc.

  • Thanks for your reply, some replies below!

    requiring positional args to use the assignment syntax

    Not sure, maybe my wording isn't clear enough. What I intended to say is that arguments can be named, not that they have to. In any case, the order of arguments must match the order of parameters, named or not.

    But you’re also missing one use of the impl keyword: fn func() -> impl Trait.

    That removal could actually happen, so I didn't list it. (Rust started requiring dyn and disallowed naked trait returns with edition 2018. So dropping the impl in that position might not be completely impossible like the other uses of impl.)

    Are you suggesting using keywords/methods [for array and slice syntax] instead?

    Yes, just methods.

    I can understand someone preferring the PartialEq/PartialOrd behavior

    You can have both – that's what's being made possible by them not being in a hierarchy.

    I think if-let makes sense, but don’t expand it.

    It's a bit late for that, isn't it? ;-)

    Why? What value does -> () provide? Why not elide that?

    What value is provided by keeping it? Why a syntactic special-case for exactly that type and not any other random type?

    languages w/o them feel awkward since you’re generally limited to one statement per line

    Then fixing that might make sense. :-)

  • I went the "only let introduces bindings" route, and I'm pretty happy so far:

     
        
    if (left.next(), right.next())
    ... is (Some(let l), Some(let r)) { /* use l and r */ }
    ... is (Some(let l), None       ) { /* use l       */ }
    ... is (None,        Some(let r)) { /* use r       */ }
    ... is (None,        None       ) { /* use nothing */ }
    }
    
      
  • Some of the earlier ones remind me of C#'s records. Were they inspired from them?

    No, that stuff is much much older.

    Named parameters are problematic because of parameter names becoming significant to the API. See Python’s * and / in parameter lists (like def foo(a, *, b) for example).

    I think the name problem is overblown, you can always have an annotation to facilitate name changes.

  • This. I'd rather have fewer, better working features.

  • This exactly what I described in 2021, so I'm pretty happy seeing other languages also going this route.

    Sadly, they also don't have a solution for the follow-up question that naturally falls out if this approach -- how to "unbox" generic types such that they can be used directly and don't need some additional type to hold it, i.e.

     
        
    union Option[T] of T, None // None defined elsewhere
    
    
      

    instead of

     
        
    union Option[T] of Some[T], None // Some & None defined elsewhere
    
    
      
  • Rust devs sometimes seem to be an incredibly insecure and angry crowd.

    I mentioned elsewhere how I had very good outcomes from looking at Rust and asking "how can this be done, but simpler?" in my language, listing a few examples ... and they were absolutely livid about it.

  • I would be deeply uncomfortable to work in an environment where one couldn't ask the author of a change for insights or rationale, because the author let some machine write it and therefore lacks any deeper understanding.

  • Deleted

    Permanently Deleted

    Jump
  • The intent of what's being done is legal harassment.

  • I'm on Codeberg because it cannot get bought out and enshittified (like GutHub, or GitLab).

  • I'm at a point where I reconsider my contribution if the project uses GitHub.

  • I think it's due to multiple reasons, and the threshold of rejecting the course of GitHub/Microsoft/the USA seems to have reached a level where GitHub stopped being the "default" place to be for a number of projects already.

    And if you are at a point were you need a Codeberg account anyway already, why not move your own projects there (or use it for new ones)?

    Not to mention, the Forgejo project is at a stage were it feels like your bug report/feature request/contribution has an actual impact.

  • No?

  • Only if you like "eventual consistency", in the sense of "eventually, your data is consistently gone".

  • The last time I looked at this the whole language was a scam collecting a shit-load of donations from naive, low-knowledge programmers.

    I decided to not look at it again based on that.

  • To be honest, this is an interesting article from a language comparison perspective, but this really weird breathless fawning over syntactic decisions (that may, at best, be slightly better than Rust) is insufferable.

    If one added all the weird stuff Zig (or "Tig" as I call it due to the endless shilling of that one database company that seems to be the sole user of the language), it simply evens out:

    Neither Rust nor Zig are particularly "beautiful" or in the top spots when it comes to good, clean, minimal syntax design.

    It's just ... weird?

    Thinking Zig has "lovely syntax" compared to Rust, feels like someone saying that Go has "great semicolon inference" based on only knowing JavaScript.

  • If you are going to annoy people, do it properly.