Skip to main content
ThunderLang™

Explainer

Explain Go code in plain English

Paste Go and read what it does: what it takes in, each check it makes, each answer it gives, and the line each one comes from. Thunder reads the code itself, with no AI, so the same code always gets the same explanation.

Type or paste your own. It explains as you type, in your browser: nothing is sent anywhere.

In plain English

Delivery fee: a rule
  Author's note: DeliveryFee: nearby orders of $20 or more are delivered free.
  You give it: total, distance km
  - Ask: Total is at least 20 and distance km is at most 5?  (line 5)
    Yes:
      - Answer: Free  (line 5)
    No:
      - Ask: Distance km is more than 15?  (line 8)
        Yes:
          - Answer: Too far  (line 8)
        No:
          - Answer: Standard  (line 11)

How to read it

  • You give it: the inputs. Ask: a check, with what happens on Yes and No. Answer or Gives back: what comes out.
  • Every step names its line, so you can check it against the code.
  • A line Thunder can't say in words yet is shown as code and marked code, not explained. It is never guessed.

More than an explanation

  • Read a file or a whole repository this way in Thunder Code, and at five levels of detail, from the big picture to the original code, in Semantic Zoom.

The example

Written by the Thunder compiler 2.0.0 while this page was built, not by hand.

Go

package delivery

// DeliveryFee: nearby orders of $20 or more are delivered free.
func DeliveryFee(total float64, distanceKm float64) string {
	if total >= 20 && distanceKm <= 5 {
		return "Free"
	}
	if distanceKm > 15 {
		return "TooFar"
	}
	return "Standard"
}

In plain English

Delivery fee: a rule
  Author's note: DeliveryFee: nearby orders of $20 or more are delivered free.
  You give it: total, distance km
  - Ask: Total is at least 20 and distance km is at most 5?  (line 5)
    Yes:
      - Answer: Free  (line 5)
    No:
      - Ask: Distance km is more than 15?  (line 8)
        Yes:
          - Answer: Too far  (line 8)
        No:
          - Answer: Standard  (line 11)