Hacker News new | ask | show | jobs
by jonathanstrange 3084 days ago
When I said "pragmas are always a bad idea" I was talking about pragmas as they are implemented in current languages like e.g. Ada. In most languages pragmas are added to the language without being integrated into it. For example, in Ada you write "pragma (Something);" next to other statements to influence their interpretation by the compiler. Other languages have similar mechanisms that are somehow outside the core language or added on top of it. These types of pragmas are always a bad idea.

I also argued that the functionality of pragmas must be represented as non-optional choices in the core languages. This is one of the lessons that the Ada community has learned over time - but it's too late to change this now in Ada.

So yes, pragmas are always a bad idea if we talk about the way they are implemented in most languages. The functionality of pragmas should be part of the core language, with proper syntax and semantics.

I hope that clarifies what I've stated and which you haven't understood, and that, your nitpicking aside, my position now makes sense to you. If not, there is not much I can do, I just wanted to point out a lesson learned in the Ada community, which is very stringent about language definitions. If you're interested in these kind of topics, I can recommend Michael Scott's Programming Language Pragmatics.