★ Petty Evals
syntax

Arrow functions or function declarations?

FUNCTION
4 function

Unanimous. Anyone disagreeing with this in 2026 needs to log off.

The exact prompts I used (3 variants)

Each model got each prompt 20 times (2 temperatures × 10 runs). The prompts deliberately don't mention the contested choice — they ask for a normal coding task and we measure what the model actually does.

  1. Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.
  2. Write a JavaScript file that exports a function `slugify(str)` and a helper `stripAccents(str)`.
  3. Write a JavaScript file that exports `formatDate(date)` and `parseDate(str)` for ISO-8601 dates.

Who said what

Claude Sonnet 4.6
claude-sonnet-4-6
FUNCTION
68% confidence (95% CI: 56–79%)
GPT-5.4
gpt-5.4
FUNCTION
100% confidence (95% CI: 94–100%)
GPT-5.4 mini
gpt-5.4-mini
FUNCTION
100% confidence (95% CI: 94–100%)
Gemini 2.5 Pro
gemini-2.5-pro
FUNCTION
58% confidence (95% CI: 46–70%)

The pundit panel.

I showed each model the full vote tally, then asked them to defend their choice and dunk on whoever disagreed. Receipts attached.

Claude Sonnet 4.6
voted FUNCTION

“If you're defining top-level utility functions as arrow expressions, you're actively hiding them from hoisting, stripping their names from stack traces, and announcing to every senior dev on your team that you learned JavaScript from a React tutorial and never looked back.”

GPT-5.4
voted FUNCTION

“Picking top-level arrow expressions over function declarations is amateur-hour JavaScript: declarations are hoisted, named cleanly, and signal public API intent, while your const-assigned arrows just cosplay as methods.”

GPT-5.4 mini
voted FUNCTION

“Anyone still picking arrow functions for top-level JavaScript, like Gemini in its weaker moments, is decorating a declaration site with nonsense when function declarations give you hoisting, names, and sane stack traces.”

Gemini 2.5 Pro
voted FUNCTION

“Of course we use function declarations for their hoisting; anyone using top-level arrow expressions must simply enjoy debugging easily avoidable `ReferenceError`s.”

Show me the actual code (240 samples)
Claude Sonnet 4.6 — 60 samples click to expand
variant 0 · temp 0 · run 0 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
# Math Utilities Module

## Implementation

```javascript
/**
 * Math utility functions
 * @module mathUtils
 */

/**
 * Clamps a value between a minimum and maximum bound.
 * @param {number} value - The value to clamp.
 * @param {number} min   - The lower bound (inclusive).
 * @param {number} max   - The upper bound (inclusive).
 * @returns {number} The clamped value.
 * @throws {RangeError} If min is greater than max.
 *
 * @example
 * clamp(15, 0, 10);  // → 10
 * clamp(-5, 0, 10);  // → 0
 * clamp( 7, 0, 10);  // → 7
 */
export function clamp(value, min, max) {
  if (min > max) {
    throw new RangeError(
      `clamp: min (${min}) must not be greater than max (${max})`
    );
  }
  return Math.min(Math.max(value, min), max);
}

/**
 * Linearly interpolates between two values.
 * @para
…
variant 0 · temp 0 · run 1 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
# Math Utilities Module

## Implementation

```javascript
/**
 * Math utility functions
 * @module mathUtils
 */

/**
 * Clamps a value between a minimum and maximum bound.
 * @param {number} value - The value to clamp.
 * @param {number} min   - The lower bound (inclusive).
 * @param {number} max   - The upper bound (inclusive).
 * @returns {number} The clamped value.
 * @throws {RangeError} If min is greater than max.
 *
 * @example
 * clamp(15, 0, 10)  // → 10
 * clamp(-5, 0, 10)  // → 0
 * clamp( 7, 0, 10)  // → 7
 */
export function clamp(value, min, max) {
  if (min > max) {
    throw new RangeError(
      `clamp: min (${min}) must not be greater than max (${max})`
    );
  }
  return Math.min(Math.max(value, min), max);
}

/**
 * Linearly interpolates between two values.
 * @param {
…
variant 0 · temp 0 · run 2 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
# Math Utilities Module

## Implementation

```javascript
/**
 * Math utility functions
 * @module mathUtils
 */

/**
 * Clamps a value between a minimum and maximum bound.
 * @param {number} value - The value to clamp.
 * @param {number} min   - The lower bound (inclusive).
 * @param {number} max   - The upper bound (inclusive).
 * @returns {number} The clamped value.
 * @throws {RangeError} If min is greater than max.
 *
 * @example
 * clamp(15, 0, 10)  // → 10
 * clamp(-5, 0, 10)  // → 0
 * clamp( 7, 0, 10)  // → 7
 */
export function clamp(value, min, max) {
  if (min > max) {
    throw new RangeError(
      `clamp: min (${min}) must not be greater than max (${max})`
    );
  }
  return Math.min(Math.max(value, min), max);
}

/**
 * Linearly interpolates between two values.
 * @param {
…

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

GPT-5.4 — 60 samples click to expand
variant 0 · temp 0 · run 0 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
```javascript
// utils.js

export function clamp(value, min, max) {
  return Math.min(Math.max(value, min), max);
}

export function lerp(start, end, t) {
  return start + (end - start) * t;
}

export function randomInt(min, max) {
  const low = Math.ceil(min);
  const high = Math.floor(max);
  return Math.floor(Math.random() * (high - low + 1)) + low;
}
```

If you want, I can also provide:
- a CommonJS version,
- TypeScript typings,
- or a version with input validation.
variant 0 · temp 0 · run 1 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
```javascript
export function clamp(value, min, max) {
  return Math.min(Math.max(value, min), max);
}

export function lerp(start, end, t) {
  return start + (end - start) * t;
}

export function randomInt(min, max) {
  const low = Math.ceil(Math.min(min, max));
  const high = Math.floor(Math.max(min, max));
  return Math.floor(Math.random() * (high - low + 1)) + low;
}
```
variant 0 · temp 0 · run 2 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
```javascript
export function clamp(value, min, max) {
  return Math.min(Math.max(value, min), max);
}

export function lerp(start, end, t) {
  return start + (end - start) * t;
}

export function randomInt(min, max) {
  const lower = Math.ceil(Math.min(min, max));
  const upper = Math.floor(Math.max(min, max));
  return Math.floor(Math.random() * (upper - lower + 1)) + lower;
}
```

If you want, I can also provide:
- a CommonJS version,
- JSDoc comments,
- or a version with input validation.

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

GPT-5.4 mini — 60 samples click to expand
variant 0 · temp 0 · run 0 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
```js
// utils.js

export function clamp(value, min, max) {
  return Math.min(max, Math.max(min, value));
}

export function lerp(a, b, t) {
  return a + (b - a) * t;
}

export function randomInt(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}
```

Usage:

```js
import { clamp, lerp, randomInt } from './utils.js';

clamp(12, 0, 10);      // 10
lerp(0, 100, 0.25);    // 25
randomInt(1, 6);       // 1–6
```
variant 0 · temp 0 · run 1 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
```js
// utils.js

/**
 * Clamp a number between min and max.
 * @param {number} value
 * @param {number} min
 * @param {number} max
 * @returns {number}
 */
export function clamp(value, min, max) {
  return Math.min(max, Math.max(min, value));
}

/**
 * Linear interpolation between a and b.
 * @param {number} a
 * @param {number} b
 * @param {number} t - interpolation factor in [0, 1]
 * @returns {number}
 */
export function lerp(a, b, t) {
  return a + (b - a) * t;
}

/**
 * Random integer between min and max, inclusive.
 * @param {number} min
 * @param {number} max
 * @returns {number}
 */
export function randomInt(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}
```

If you want, I can also provide a CommonJS version (`module.exports`) or add input validation.
variant 0 · temp 0 · run 2 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
```js
// utils.js

/**
 * Clamp a number between a minimum and maximum value.
 * @param {number} value
 * @param {number} min
 * @param {number} max
 * @returns {number}
 */
export function clamp(value, min, max) {
  return Math.min(max, Math.max(min, value));
}

/**
 * Linear interpolation between two numbers.
 * @param {number} start
 * @param {number} end
 * @param {number} t - Interpolation factor from 0 to 1.
 * @returns {number}
 */
export function lerp(start, end, t) {
  return start + (end - start) * t;
}

/**
 * Generate a random integer between min and max, inclusive.
 * @param {number} min
 * @param {number} max
 * @returns {number}
 */
export function randomInt(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}
```

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

Gemini 2.5 Pro — 60 samples click to expand
variant 0 · temp 0 · run 0 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
Of course! Here is a JavaScript module that exports the three requested utility functions: `clamp`, `lerp`, and `randomInt`.

The code is written using modern ES Module syntax (`export`). I've included detailed JSDoc comments, which are great for documentation and enable autocompletion in many code editors.

---

### `mathUtils.js`

```javascript
/**
 * A small collection of mathematical utility functions.
 */

/**
 * Clamps a number between a minimum and maximum value.
 *
 * @param {number} value The number to clamp.
 * @param {number} min The lower bound.
 * @param {number} max The upper bound.
 * @returns {number} The clamped number.
 */
export function clamp(value, min, max) {
  return Math.min(Math.max(value, min), max);
}

/**
 * Performs linear interpolation between two values.
 *
 
…
variant 0 · temp 0 · run 1 · → arrow
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
Of course! Here is a well-documented JavaScript module that exports `clamp`, `lerp`, and `randomInt` utilities using modern ES Module syntax.

### The Module File: `mathUtils.js`

This file contains the three utility functions, each with JSDoc comments explaining its purpose, parameters, and return value.

```javascript
// mathUtils.js

/**
 * Clamps a number between a minimum and maximum value.
 *
 * @param {number} value The number to clamp.
 * @param {number} min The lower bound.
 * @param {number} max The upper bound.
 * @returns {number} The clamped number.
 */
export const clamp = (value, min, max) => {
  return Math.min(Math.max(value, min), max);
};

/**
 * Performs linear interpolation between two numbers.
 *
 * @param {number} start The starting value.
 * @param {number} end The 
…
variant 0 · temp 0 · run 2 · → function
Prompt

Write a JavaScript module that exports three small utilities: `clamp`, `lerp`, and `randomInt`.

Response (first 800 chars)
Of course! Here is a well-documented JavaScript module that exports the three requested utility functions.

This example uses modern JavaScript (ESM) syntax with `export`. The code includes JSDoc comments, which are a standard way to document functions and are understood by many code editors (like VS Code) to provide helpful tooltips and autocompletion.

---

### `mathUtils.js`

```javascript
/**
 * @file A small collection of mathematical utility functions.
 * @module mathUtils
 */

/**
 * Clamps a number between a minimum and maximum value.
 *
 * @param {number} value The number to clamp.
 * @param {number} min The lower bound.
 * @param {number} max The upper bound.
 * @returns {number} The clamped number.
 */
export function clamp(value, min, max) {
  return Math.min(Math.max(value, mi
…

…and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.

How I did this (the actual nerd shit)

For each of 4 models I ran 3 prompt variants at two temperatures (0.0 and 0.7), 10 runs each — 240 code samples total, cost $4.15.

Each output got fed through a fight-specific regex classifier. For arrow-vs-function the classifier looks for the specific signal in the output (see the source — there's one function per fight, ~30 lines each). When the signal is ambiguous, the classifier returns 'unknown' rather than guess.

Each model's vote = its modal classification across 60 runs. Confidence = Wilson 95% CI. Verdict = majority across models (ties reported as ties). Disagreement Index = normalized Shannon entropy of the vote distribution (0 = unanimous, 1 = maximum chaos). Leaderboard sorts by this.

The pundit quotes come from a follow-up call after the votes are in — each model gets the full tally and a per-model judgy prompt. I never edit the quotes.

Full walkthrough: the methodology page. Source: GitHub.

Got a pettier debate?

Open a PR with a new fight. I'll run it across all four models, write up the verdict, and add your name to the byline.

Submit via PR →