Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 39 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
BS
==
# BS

Implementation of the BS language as created by Mark Rendle at BuildStuff.lt 2014

BS is a general purpose Gradually typed language which can and should be used for building absolutely everything absolutely all the time.

* BS Hates programmers
* Booby trapped aztec temple pit of fail
* Programs must be edited and saved using Microsoft Word (2003)
* Compiles to ECMAScript3
- BS Hates programmers
- Booby trapped aztec temple pit of fail
- Programs must be edited and saved using Microsoft Word (2003)
- Compiles to ECMAScript3

[Watch the talk, recorded at SkillsMatter](https://skillsmatter.com/skillscasts/6088-the-worst-programming-language-ever)
[Watch the talk, recorded at SkillsMatter][talk-link]

##Example program

#define /^my (.*?) thing:$/class \1:/
my Greeter thing:
public function __construct(€name)
HALT_AND_CATCH_FIRE
## Example program
```
#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)

public function say(€thing isProbablyA String)
echo €thing, « », €this->name, BS::EOL;
Delete €thing;

##Language Features

* Significant whitespace
* Significant formatting
* 17 bit integers
* Variables must be prefixed by €
* Variable hoisting from all scopes
* Exception handling - BS has only one exception - HALT_AND_CATCH_FIRE
* Raise exceptions conditionally with `(unless <condition>)`
* String processing:
* ' ' Single quotes for ASCII strings
* '' '' Double single quotes for ANSI strings
* " " Double quotes
* "" "" Double double quotes
* « » European quotes are used for UTF-256
* «« »» Double european quotes used for UTF-256 with string interpolation
* Mandatory Comments - at the end of every line, demarked by 5 spaces
* Optionally end statements with ;
* `unless` statements must be terminated with ;
* Regex Aliasing - #define
* Line numbers are mandatory, and must increment in steps of 42
```

## Language Features

- Significant whitespace
- Significant formatting
- 17 bit integers
- Variables must be prefixed by `€`
- Variable hoisting from all scopes
- Exception handling (BS has only one exception: `HALT_AND_CATCH_FIRE`)
- Raise exceptions conditionally with `(unless <condition>)`
- String processing:
- `' '` Single quotes for ASCII strings
- `'' ''` Double single quotes for ANSI strings
- `" "` Double quotes
- `"" ""` Double double quotes
- `« »` European quotes are used for UTF-256
- `«« »»` Double european quotes used for UTF-256 with string interpolation
- Mandatory Comments - at the end of every line, demarked by 5 spaces
- Optionally end statements with `;`
- `unless` statements must be terminated with `;`
- Regex Aliasing - `#define`
- Line numbers are mandatory, and must increment in steps of 42

[talk-link]: https://skillsmatter.com/skillscasts/6088-the-worst-programming-language-ever "Watch the talk on SkillsMatter.com"