2
Import module sys.
Sys dot stdout dot write, quote:
Hello world, end quote.

import sys
sys.stdout.write("Hello world")

Is computer code protected as speech by the First Amendment? If the government passed a non-intellectual-property-related law that made a certain type of software illegal, without a compelling interest, would the law be constitutional? For example, suppose Congress passed a law banning hello world programs. Would that be constitutional?

What about the code "translated" into English, as in the hello world haiku above?

1
  • Worth looking into the history of the PGP encryption software. There was a time when exports were controlled from the US but it was apparently exported in the form of printed books of source code under free speech law protection.
    – bdsl
    Sep 18, 2022 at 15:59

1 Answer 1

2

Is computer code protected as speech by the First Amendment?

Why wouldn't it be? Media of expression that are far more distant from speech, even to the point of having no linguistic content whatsoever, enjoy first amendment protection (flag burning comes to mind).

Having said that, I should note that first amendment protection is not absolute.

suppose Congress passed a law banning hello world programs. Would that be constitutional?

No, unless the law stands up to strict scrutiny. This means that it must be narrowly tailored, using the least restrictive means to advance a compelling government interest.

Now, it's certainly difficult to imagine a compelling interest served by banning "hello world" programs, but there are many other programs that could be subject to a ban, and indeed there are some kinds of programs that already are illegal (for example, it is not legal to write a program that sends daily death threats to someone).

3
  • I'd suggest that using code files or the program they can create as a medium to record and disseminate speech is also protected by freedom of the press. Sep 18, 2022 at 8:36
  • @IllusiveBrian there's not much jurisprudence differentiating freedom of speech from freedom of the press (as far as I am aware; I'm no expert). But I am not sure I understand your comment; is it relative to my death threat example? I wasn't imagining recorded speech so much as a hard-coded text sent by e-mail, something like sendSmtp(to:"[email protected]", from:"me", body:"I hereby threaten your life.").
    – phoog
    Sep 18, 2022 at 8:43
  • 1
    For example, end to end encryption messaging programs like Signal and traffic obfuscation systems like TOR were used to get reports and news from sources in areas with strict Internet filtering like Hong Kong. If the US tried to ban the use of those kinds of apps to make it easier for LEAs track down confidential sources it could be argued separately as an infringement on the press. Sep 18, 2022 at 9:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .