3 comments

  • skulk21 days ago
    Interesting use of macros to get a generic &quot;result&quot; thingy:<p><a href="https:&#x2F;&#x2F;git.sr.ht&#x2F;~willowf&#x2F;beebo&#x2F;tree&#x2F;master&#x2F;item&#x2F;src&#x2F;result.h" rel="nofollow">https:&#x2F;&#x2F;git.sr.ht&#x2F;~willowf&#x2F;beebo&#x2F;tree&#x2F;master&#x2F;item&#x2F;src&#x2F;result...</a><p>I think it&#x27;s cool that stuff like this works in C but my gut feeling is that this isn&#x27;t going to play well with LSP tools. Are state-of-the-art C LSP servers aware of the preprocessor?
    • bertylicious21 days ago
      I don&#x27;t see an advantage over C&#x27;s usual error handling, because this type is lacking the support functions (like bind and fmap in functional languages) or syntax integration (like the try operator in rust) that would make it useful.
    • anon2578317 days ago
      I&#x27;m using a current version of VS Code with the IntelliSense mode set to `linux-gcc-x64` and it seems to work quite well actually.
    • whou20 days ago
      yes, C LSP servers can deal with the preprocessor just fine, even the trickier C preprocessor &quot;hacks&quot;. clangd is built on top of clang, after all.
  • schmuckonwheels21 days ago
    Rest in peace, Sky King.