• onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    1 hour ago

    I honestly don’t get why people like Go. Structural typing makes it so difficult to find classes that interpret an interface. Every dumb go project has to be opened in an IDE or something with a language server to find implementors of an interface. Also, forcing every capitalised object in a module or struct to be exported is just… wat? Returning a tuple of whatever, err also feels wrong. It’s like they couldn’t decide between throwing exceptions or an enum and went with something in between.

    I get that the inbuilt concurrency features are nice, but the rest of the language and stdlib feel very lackluster. At least that’s my impression after ~2 weeks of it. My retreat to Rust was rather quick.

    Anti Commercial-AI license

    • OmegaLemmy@discuss.onlineOP
      link
      fedilink
      arrow-up
      5
      ·
      5 hours ago

      read svg file with path given in config

      Know Jack shit about go and since all you need to do is read a file and put it in I thought I’d let ai handle it

      İt took me far too long and I was just done with it by then and the ai for some reason is acting fucking playful it’s even mocking me I can’t handle it

      • Solemarc@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        4 hours ago

        My comment was supposed to be a bit of a joke…

        Generally speaking, you cannot read a file from disk using JS in the browser because the sandbox doesn’t allow the code access to your disk. If you googled something like “read a file JS” it probably made an assumption that you’re using Server side like nodejs or deno. The only exception for in-browser that I know of is to upload files using an input tag.