Rockstar, a new Turing-complete programming language, is "designed for creating computer programs that are also song lyrics, and is heavily influenced by the lyrical conventions of 1980s hard rock and power ballads." With tongue firmly in cheek, its name and format has been derived from the reference of "rockstar developers" by recruiters - so, thought Dylan Beattie, let's literally interpret the term.
Let's find out how, for example, it uses variables.
Proper variables are proper nouns - any word that isn't a reserved keyword and starts with an uppercase letter. Proper variable names can contain spaces as long as each space is followed by an uppercase letter. Whilst some developers may use this feature to create variables with names like Customer ID, Tax Rate or Distance In KM, we recommend you favour idiomatic variable names such as Tommy, Gina, Doctor Feelgood, Mister Crowley, Kayleigh, Tom Sawyer, Billie Jean and Janie.Dylan Beattie
(Although not strictly idiomatic, Eleanor Rigby, Peggy Sue, Black Betty, Layla and Johnny B Goode would also all be valid variable names in Rockstar.)
Poetic number literals offer a bit of fun, as follows:
Tommy was a lovestruck ladykiller initialises Tommy with the value 100Dylan Beattie
Sweet Lucy was a dancer - initialises Sweet Lucy with the value 16
A killer is on the loose - initialises a killer with the value 235
My dreams were ice. A life unfulfilled; wakin' everybody up, taking booze and pills - initialises my dreams with the value 3.1415926535