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/)GE
Posts
0
Comments
332
Joined
12 mo. ago

  • You can also optimize this a bit.

    You can use Activator.CreateInstance instead of reflecting and invoking the constructor.

    You can also call MethodInfo.Invoke, you don't need to create a delegate.

    Also worth noting that Source Generators have replaced the need for reflection in many cases.

  • Permanently Deleted

    Jump
  • In the UK unless your parents are particularly poor it is not that common to support them.

    We have a socialised pension that most should be able to live on. And most people have private or government pensions as well.

  • I've found they're great as a learning tool where decent docs are available. Or as an interactive docs you can ask follow up questions to.

    We mostly use c# and it's amazing at digging into the MS docs to pull out useful things from the bcl or common patterns.

    Our new juniors got up to speed so fast by asking it to explain stuff in the existing codebases. Which in turn takes pressure off more senior staff.

    I got productive in vuejs in a large codebase in a couple days that way.

    Using to generate actual code is insanely shit haha It is very similar to just copy pasting code and hacking it in without understanding it.

  • Safe C++

    Jump
  • The problem with dynamic typing is you can't always figure out what the type is even with investigation as it can be lots of things based on what is passed or returned. It also allows incorrect values to be passed.

    People will indeed make that readability argument but if the type is not obvious and important to understanding the code then it likely shouldn't be used there.

  • Safe C++

    Jump
  • auto isn't dynamic typing it's just type inference. It still has a fixed type you just don't have to write it. Like var in C#.

    Lambdas are just a way of defining methods in place. It has nothing to do with callbacks.

    But you're spot on for memory safety. Managing it yourself is risky and if it can be managed at zero cost it seems stupid not to.