News for hackers. Stuff that matters.

bdisnainc

Re:Legitimate Use of Variable Length Arrays on Monday October 28, 2019 @12:19PM (#21378305)
Very good GCs can be faster compared to common system allocators while minimizing the STW moment, but you cannot beat using a proper allocator for your needs.
Re:Legitimate Use of Variable Length Arrays on Monday October 28, 2019 @11:55AM (#21378061)
It does not do random damage, you get a segmentation fault in most systems.

In really small embedded you should not be allocating anything meaningful in the stack anyway.

Re:Apple Developer Documentation Is Missing on Monday October 28, 2019 @11:48AM (#21377990)
That is because you apply pattern matching when it is not really useful here, on top of avoiding a simple ternary operator.

In some languages, you simply write:

    if (user)
      nameLabel.text = user.name;
    else
      nameLabel.text = "Guest";
Or:

    nameLabel.text = user.name if user else "Guest"

Or anything along those lines. Concise, clear, no need for an extra operator.