BS

From Esolang
Jump to navigation Jump to search
BS
Paradigm(s) imperative, sadistic
Designed by Mark Rendle
Appeared in 2014
Computational class Unknown
Reference implementation Unimplemented
Influenced by PHP, Python, F♯, Haskell, ECMAScript, Visual Basic, C
File extension(s) {{{files}}}

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 languages.

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".

Example

#define /^my (.*?) thing:$/class \1:/

my Greeter thing:
  public function __construct(€name)
	  HALT_AND_CATCH_FIRE
	(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;

Implementation

External Links

Mark Rendle has a talk introducing BS entitled The Worst Programming Language Ever and explaining several design choices.

A more recent version of the talk is also available here : The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021.