From Esolang
Jump to: navigation, search

BS is a joke language invented by Mark Rendle to be as cruel and painful to use as possible. It tries to take the worst bits of many language.

It is based on PHP and uses the Euro symbol as variable sigils. It borrows significant whitespace from Python, F# and Haskell because of their ability to cause invisible errors. It copies javascripts confusing equality operator and takes it a step further the negation of the strict equality operator (!=!). There are (at least) 6 different types of string quotes that all have different meanings, many of them are used for compatability with very old systems. Following Visual Basic it uses round parenthesis for array indices as well as function calls in an attempt to be confusing. Inspired by the C preprocessor it has a macro system based on regular expression substitution.

It only has 'unless' conditional chosen since it is the most confusing one. It only has one exception HALT_AND_CATCH_FIRE since the experienced programmer should know what went wrong. The integers are 17-bit "because we can".


#define /^my (.*?) thing:$/class \1:/
my Greeter thing:
  public function __construct(€name)
    (unless €name != null);
    €this->name = €name;
    Delete €name;

  public function say(€thing isProbablyA String, €times)
    42 echo €thing, « », €this->name, BS::EOL;
      goto 42;
    (unless --€times !!=! 0);
    Delete €thing, €times;