· 5 min read
Polish does not compile
Polish makes a terrible programming language because too much of each sentence lives outside the text, in the speaker and the conversation.

Polish is the worst programming language I know. Not Polish notation — prefix operators are almost embarrassingly easy to parse — the natural language, the one with seven cases. Treat a sentence as source code and it asks the compiler to recover types from word endings and to fetch missing variables from whoever happens to be speaking.
Consider what the environment already holds before the first statement runs. The speaker's grammatical gender, for a start, because past-tense verbs agree with it. Integer literals decide which case their noun takes and whether the verb behaves as plural or as neuter singular. And a single printed word can turn out to contain several syntactic tokens.
Napisałem program. // I wrote a program; masculine agreementNapisałam program. // I wrote a program; feminine agreementDwa koty spały. // two cats sleptPięć kotów spało. // five cats sleptThis is everyday Polish, nothing exotic — and read as code, every line leans on ambient state that no function signature admits.
The lexer starts in debt#
A lexer wants a stable answer to one small question: where does a token end? The Universal Dependencies specification for Polish has to distinguish orthographic words from syntactic tokens, and its example wyprodukowalibyśmy, “we would have produced,” is one space-delimited word hiding three syntactic pieces.
wyprodukowalibyśmy= wyprodukowali + by + śmy= l-participle + conditional + first-person pluralThe same specification notes that punctuation can participate in an inflected form, as in Melville'a, so splitting on whitespace fails and treating apostrophes as delimiters fails too. You need morphology before you can finish lexing.
The bill keeps arriving after tokenization. A study of style markers in inflected Polish describes how prominent endings and proliferating surface forms make generic tokenization sparse. A word like program won't stay one convenient key; its role in the sentence changes its visible form, and getting back to the shared lemma means doing grammatical analysis.
Five changes the type of cat#
Then there's the type system. The Polish treebank model records seven cases and five grammatical genders — three masculine classes, feminine, and neuter — and I had to read that twice, because the masculine classes don't even map cleanly onto real-world animacy. Adjectives, determiners, numerals, pronouns, verbs, and auxiliaries all participate in agreement. The genders are facts about the words themselves; the world doesn't enter into it.
And the integer literals overload the grammar. With two cats, the noun is nominative plural and the past-tense verb is plural: Dwa koty spały. With five, the noun drops into genitive plural and the verb shows up as neuter singular: Pięć kotów spało. The quantity changes the agreement regime of the whole expression.
The analysis is hard enough that the two Polish Universal Dependencies treebanks disagree about whether the governing numeral in a typical subject phrase should be treated as nominative or accusative. Speakers aren't waiting for that dispute to resolve; they use the construction every day without consulting a syntax tree. The trouble only starts when somebody tries to press that competence into a formal model.
In a conventional language, 5 changes a value. In Polish it also changes the case of an operand and the number of a predicate — excellent compression if you already know the rules, and a fairly hostile API if you're a parser hoping for local types.
The process owns ambient state#
In Napisałem program and Napisałam program, the verb ending carries first person, past tense, and masculine or feminine agreement, so the pronoun ja, “I,” can stay home. A compiler translating either sentence still needs to know who's speaking. That input never appears in the text; it arrives with the person.
Word order smuggles in another dependency. Because the case endings preserve grammatical roles, position is free to signal what the sentence treats as established or new. Research on discourse in English-to-Polish machine translation describes Polish constituents as ordered by salience, with the important information tending toward the end regardless of grammatical function.
Jan kocha Marię. // neutral: Jan loves MariaMarię kocha Jan. // same roles; Jan can become the focusBoth lines can say that Jan loves Maria — Jan is nominative, Marię accusative — but the second one answers a different conversational question by moving Jan into the final, informative position. A parser that returns the same dependency graph for both has preserved who did what and thrown away why the speaker chose that order.
The sentence is not a closed term. It closes over the conversation.
The runtime is another person#
Programming languages engineered this kind of dependency out deliberately. Vocabulary is narrow, precedence is frozen, bindings are declared, and any program where two meanings survive the grammar gets rejected. All of that exists because the compiler can't lean across the desk and ask what you meant.
Computational Polish has to build an explicit support structure around what speakers do for free. The Polish LFG Universal Dependencies treebank contains more than seventeen thousand sentences generated through a formal grammar and then manually disambiguated by human annotators — the grammar proposes the possibilities, and a person sits there deciding which one each sentence actually used.
The ranking is a joke, obviously, but the failure mode underneath it is real. Polish makes the category error easy to see because so much of the information moves through inflection and through whatever the speaker and listener already share. Those features only become liabilities when the target runtime is a machine with no childhood and no memory of the previous sentence.
As a language for people, Polish spends its complexity well: emphasis can move and repetition can be skipped, and nothing is lost because the endings keep the roles recoverable. As a programming language it leaves half the program outside the file. Take away the speaker and the listener, and what remains is the part of the program they were supposed to supply.