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
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ BS is a general purpose Gradually typed language which can and should be used fo

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

##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)
echo €thing, « », €this->name, BS::EOL;
Delete €thing;

##Language Features
## Example program

```bs
#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)
echo €thing, « », €this->name, BS::EOL;
Delete €thing;
```

## Language Features

* Significant whitespace
* Significant formatting
Expand All @@ -36,12 +38,12 @@ BS is a general purpose Gradually typed language which can and should be used fo
* 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
* `' '` 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 ;
Expand Down