$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #549

Which programming language is this?

struct Temperature {
    var celsius: Double
    var fahrenheit: Double {
        celsius * 9 / 5 + 32
    }
}

Answer: Swift

A struct with a computed property declared as var fahrenheit: Double { ... } is Swift.
Play Programming Languages ▸