for convenience

Chris Angelico rosuav at gmail.com
Thu Mar 24 15:07:56 EDT 2022


On Fri, 25 Mar 2022 at 06:05, Grant Edwards <grant.b.edwards at gmail.com> wrote:
>
> On 2022-03-24, Chris Angelico <rosuav at gmail.com> wrote:
>
> > No, I would say that a preprocessor of that sort isn't necessary to a
> > Python-like language. If you really want one, it's honestly not that
> > hard to do; remember, "preprocessor" means that it processes the
> > source code before the main language sees it, so you can do that even
> > with Python as it currently is.
>
> And they're best used to make it look like you're actually programming
> in a different language. You can make your C program look like BASIC,
> or your Python program look like Pascal!
>
> The best part is that nobody else will be able to figure out WTH is
> going on, even if they are fluent in _both_ of the languages!
>
> Amaze your friends!
>
> Turn complete strangers into enemies!
>

Yes! This is, in a sense, the counterpart to polyglot code, where the
same script can be run with any of several interpreters. Both are
extremely effective at turning people's brains to mush.

ChrisA


More information about the Python-list mailing list