Hacker News new | ask | show | jobs
by DanWaterworth 4860 days ago
If doing this is such a bad idea then why is it so easy?
1 comments

If doing:

  #define BEGIN {
  #define END }
were such a bad idea, then why is it so easy?
Maybe the language is poorly designed.
Or maybe the connection between being able to do something and it being a good idea to do something is just in your head.
In my experience, making obviously bad things difficult or impossible improves reliability. This idea certainly resides within my cranial cavity, but that doesn't necessarily make it wrong.
How could:

  HashMap = HashTable = Map = Table = Dictionary = Hash
possibly not qualify as "obviously bad"? The only reason you've offered up is because it is easy...
I think this is fine. The obviously bad part is being able to remove/change constants, especially as these changes are global.