GithubHelp home page GithubHelp logo

frappuccinoscript's Introduction

Introducing FrappuccinoScript

There's not a man, woman or child on the face of the earth, who doesn't enjoy a tasty beverage.

Mr David Letterman

FrappuccinoScript is a proposal for a brand new dialect of JavaScript that is designed to add mountains of creamy filling to the watery JavaScript offering we've had to consume in the past. Of course, at it's foamy center, FrappuccinoScript is still JavaScript, in fact our motto is, "It's just a rather verbose version of JavaScript."

FrappuccinoScript is here for those of us who find plain-old JavaScript just too damned confusingly terse! For example, in ordinary JavaScript you write var for "variable," yet cannot write fun for "function." WTF? How many hours have you wasted trying to guess which keywords are shortened and which are not? FrappuccinoScript solves this problem by normalising all the inconsistency away, so you can always write the most verbose form of any expression, all the time.

At last! Someone fixed JavaScript; no more confusing terseness!!!

Declaring and Defining Variables

We do away with all the "confusing parts" of JavaScript, including the famously misjudged "comma operator" and the ability to both declare and define a variable in the same statement.

In addition, you can forget about trying to decide when to use a primitive value and when to use a full-on object wrapper for your numbers and strings; FrappuccinoScript doesn't even recognise primitives without a full object wrapper!

Write FrappuccinoScript

variable x;
variable y;
variable z;
x = new Number(1);
y = new Number(2);
z = new Number(3);

Compiles to JavaScript

var x = 1, y = 2, z = 3

And look! Never sure when you should and shouldn't use semicolons or newlines, or...??? Not any longer. In FrappuccinoScript semicolons and newlines are always required! It actually won't run with any other combination!

Built-In Mathematical Functions

Stop trying to guess what shortened name to use, and just relax while you spell out out the entire, full, long form of every name!

Write FrappuccinoScript

variable x;
x = Mathematics.absoluteValueOf(x);
variable y;
y = Mathematics.LEONHARDEULERSNUMBER;
variable z;
z = Mathematics.arctangentOf(z);

Compiles to JavaScript

var x = Math.abs(x), y = Math.E, z = Math.arc(z)

Global Built-In Functions

All global built-in functions are defined by their full un-abbreviated names. Confusing and error-prone constructs like "nesting" of function calls or "chaining" of method results are never allowed in FrappuccinoScript.

Write FrappuccinoScript

variable a;
a = new String("x*y");
a = evaluate(a);
a = parseIntegerFrom(a);

Compiles to JavaScript

var a = parseInt( eval("x*y") )

† Sick and tired of coworkers mocking your use of JavaScript's eval function by calling it "evil"? Well just watch them try to come up with a catchy putdown that rhymes with FrappuccinoScript's evaluate!

There's More!

Now you can switch into FrappuccinoScript mode with one simple statement at the top of your script files. Simply add the statement use "verbose";, then sit back and enjoy all the keyboard-straining, LOC-growing, pedantic completeness that FrappuccinoScript requires (and will immediately throw syntax errors to ensure that it gets), without any of the terseness that had previously stopped JavaScript from being the most beautiful language you've ever used!

Write FrappuccinoScript

use "verbose";

variable s;
s = new String("beautiful");
variable n;
n = new Number(1);
variable c;
c = s.characterAtPosition(n);

Compiles to JavaScript

var c = "beautiful".charAt(1)

© 1st April 2014, Michael J Mathews. All rights Reserved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.