Move semantics for Nim

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 9

  • @ThePrimeyuri
    @ThePrimeyuri 4 роки тому +7

    programing in nim is pure joy, i am beginner though

  • @TinBryn
    @TinBryn 4 роки тому +3

    On that question about nilability and you answered that Nim style moves can't use a variable after it is used and so the compiler can pretend that it's ok to set it to nil even when it is non-nilable. I think it a better solution is to have destructive moves where it doesn't call the destructor and lets the moved from variable just fall off the stack.

    • @andreasrumpf9012
      @andreasrumpf9012  4 роки тому +8

      Yes, in the spec that is actually covered as optimizing away so called `wasMoved(x); destroy(x)` pairs. We're working on that.

  •  4 роки тому +6

    I am still wondering cuda with nim. There is nimcuda but it is only supports cuda 8. Cuda is very important to grow nim at hpc area.
    I am using Python because modules and good gpu support.

    • @mamyratsimbazafy3328
      @mamyratsimbazafy3328 4 роки тому +9

      Nimcuda works with 10.2. I develop Arraymancer (github.com/mratsim/Arraymancer) and the Cuda tests pass on my machine.

  • @muhammadreihanhaekal5117
    @muhammadreihanhaekal5117 4 роки тому

    hope you doing well :)

  • @uncannydeduction
    @uncannydeduction 4 роки тому

    Would be great if you didn't prioritize compiler speed in my opinion. To make the compiler smarter so that we can write simpler code. Computers will get faster in time.

    • @ctrlaltdebug
      @ctrlaltdebug 4 роки тому +4

      I disagree. C++ compile times are still slow after 35 years!

    • @itellyouforfree7238
      @itellyouforfree7238 4 роки тому +1

      @@ctrlaltdebug because C++ is like 35 diffent languages put together lazily without thinking about how they interact