Solving Business
Problems with
JS++
ROGER POON
@ROGERPOON
ROGER@ROGER.NETonux.com/jspp
Sound vs. Unsound
Unsound type systems are
untrustworthy
False sense of security
Extremely hard problem to solve
Example: Forgiving
var a = 1;
var b = "Some message";
// Hundreds of lines later...
console.log(a - b); // NaN
Example: Unforgiving
function getMsg() {
if (maybeTrue()) {
return "Some message";
}
}
var ch = getMsg().charAt(0);
console.log(ch); // Never runs
Defining "crash" in JS
Form doesn't submit
Clicking button/link does
nothing
Node.js server goes down
What if the compiler could find
all your errors for you?
1000 Execution Paths
foobar();
List of JS++ Types
bool
string
void
float
double
int
unsigned int
short
unsigned short
byte
signed byte
Hello World
external console;
console.log("Hello World");
jQuery in 2 (or 3) Lines
external jQuery, $;
string url =
$("#logo").attr("src");
Why was Java Successful?
Garbage Collection
Cross-platform
Developers can focus on what
MATTERS
Thank You!
ONUX.COM/JSPP

Solving Business Problems with JS++

Editor's Notes

  • #10 JS superset
  • #11 You can't subtract, mult, div from url
  • #12 You don't have to worry anymore about calling an undefined function or string - string The future Our philosophy: high-quality software development
  • #13 Mars Climate Orbiter Consider an error that causes your biggest client (or all your clients) to lose data Could end your company! Less expensive to fix these errors before moving it to production