3 ms·
> And that, ladies and gentlemen, is called a framework. It's different. Macros can change the language grammar (it's like inventing a new way to structure a s
by ngrilly 9y ago
> And that, ladies and gentlemen, is called a framework.
It's different. Macros can change the language grammar (it's like inventing a new way to structure a sentence in English, instead of the usual object-verb-complement). Libraries just provide new vocabularies (new names, new verbs, etc.).
- erikj 9y agoToo often frameworks end up also changing the grammar, but doing it in a clunky unnatural way, shoehorning it into the language with tons of boilerplate code that could have been eliminated with a few simple macros.
- ngrilly 9y agoA framework cannot change a programming language grammar without using macros. Most framework provide new types, functions, classes, constants, etc., which are expanding the vocabulary, not the grammar. You can use the English language to express ideas on very different topics (food, law, engineering, romance, etc.) without changing its grammar.
- wtetzner 9y ago> It's different. Macros can change the language grammar But that's the point. When you can't change the grammar, you instead end up writing in a different language that doesn't even have a grammar, and encoding it in the base language plus a bunch of horrible configuration. Look at Spring for an example.