5 ms·
Credit where credit is due: Pascal had “with” back in the 1970’s.
by drfuchs 3y ago
Credit where credit is due: Pascal had “with” back in the 1970’s.
- kragen 3y agowhere it doesn't have most of these problems due to static typing
- olliej 3y agoyeah, it cannot be emphasized enough the hazards of with() like constructs in languages with dynamic types and dynamic variable lookup are drastically different. That's why it was a mistake for it to be in JS, and why it was deprecated and blocked in strict mode.
- deleted 3y ago[deleted]
- drewcoo 3y agoIt was in Burroughs Algol in the 60s. Algol was Pascal's parent. WITH was not in all Algols, but Wirth was free to borrow the best ideas. https://en.wikipedia.org/wiki/ALGOL_60 https://en.wikipedia.org/wiki/ALGOL_60