Trumpscript: a programming language based on the rhetorical tactics of Donald Trump


Trumpscript -- a python variant -- only allows numbers over 1,000,000; has no import statements (all declarations must be homegrown); only has integers because floating-point numbers are un-American (America never does anything halfway); only allows popular words and the names of politicians as variable names; limits error messages to direct Trump quotes; and requires that all programs end with "America is great."

Here is a valid Trumpscript program:

Trumpscript was created in 20 hours by Sam Shadwell and Chris Brown, computer science students at Rice U, for a codeathon.

What about TrumpScript makes you most proud?

Sam: I kind of like the way that it works — if it actually worked, completely, which it…doesn’t —

Chris: There’s some stuff — I’m working out some kinks.

Sam: I’m most proud that the language itself is actually parsed and compiled in a way that sort of resembles how a real compiler would compile a real language.

Chris: In what I would consider proper TrumpScript style: 80 percent of the words you write should probably get dropped by the compiler and be completely unnecessary to the program.

Coders Assimilate Donald Trump to a Programming Language [Joe Carmichael/Inverse]

Start the discussion at