alexanderbrevig
alexanderbrevig on Hacker News
Posted by
alexanderbrevig on Sunday March 10, 2024 @05:35PM
from the github.com dept.
This project is finally at a point where it makes me more productive writing our in-house documentation using GitHub Pages. I think it may help you too!
I hope you like it and contribute to it with issues or PRs.
Time to make up for my lost time making the LSP, by using the LSP :)
This is what the windows developer community needs!
* not all languages have macros
* you don't use test frameworks for enabling and disabling code inline while you're developing
Please read the protip, understand my intention (keyword TRICK) and have a delightful cup of coffee. You've earned it.
This is exactly what this trick can be used for. Thank you for voicing your opinion. Happy coding!
This is not an attempt at branching, this is a trick.
The protip is not to use the trick, but to know about it. Read the tip, try to understand the intention - then criticize. Thank you kind sir.l
You're the one not knowing how to read and comprehend. This is a trick, I hope you learn some some day. My god this is tiring...
"I'd appreciate if you'd have this discussion on Coderwall. That way I could 'defend' the post where it's due.
However though, please read
https://news.ycombinator.com/item?id=5626456 and summary is:
It is a trick, not a silver bullet. It prevents code from being compiled to the binary, in a portable - yet hacky - way."
Run that with vanilla JavaScript, Java, SQL or anything but C/C++ [this is the premise of the protip] and I'll bake you a cake! (One that's not a lie;) Nothing that's discussed here does the same thing, though I completely agree there is a lot of better techniques for various tasks, nothing is functionally the same as the trick. (Why can I not reply the the reply of this post? I'm new here.)
I'd appreciate if you'd have this discussion on Coderwall. That way I could 'defend' the post where it's due.
However though, please read https://news.ycombinator.com/item?id=5626456 and summary is:
It is a trick, not a silver bullet.
It prevents code from being compiled to the binary, in a portable - yet hacky - way.
I understand the criticism, it's not supposed to be _the_ way to toggle code in and out.
It's a TRICK, and that's all it will ever be.
However, it is the only way I know of that is not language specific for a particular dialect of C (#ifdef) that enables code to _not_ become a part of the compiled binary, or in JS terms - not available from the runtime.
Best regards
-OP