A script language designed specifically to prevent you from writing a good quality code and to promote an entire classes of bugs.
- written in JavaScript
- no statements, only expressions
- no
var
(variables are always declared in a global scope by default) - no
return
– ShitScript returns the last evaluated expression - no floating point numbers (only integers)
- no unary operators (?)
- no classes, no
array
's, noobject
's (except forconsole
andwindow
)
- allow using
-
,?
,!
in function names (no-camel-case
) - super weird type coercions (or just some non-obvious implicit coercions result in string
'shit'
) ;
->)))
===
->====
,!==
->!===
(...)
->[...]
function
->shit
/fuck
try
->why-the-fuck-not
catch
->fucked-up
finally
->dont-fucking-care
- say
please
to enable lexical scoping - you can't use a couple of numbers (e.g.
4
and2
) for no reason x / 0
=Math.random()
if
->o-rly?
then
->ya-rly
else
->no-way
o-rly?
-ya-rly
-no-way
for one-liners (without brackets).
->->
(works only forconsole
andwindow
)
An example program:
fuck wat[] {
calculate!!![2, 0])))
}
shit calculate!!![y, x] please {
z = 5)))
why-the-fuck-not {
o-rly? z % 2 ==== 0 {
y / x)))
} no-way {
x / y)))
}
} fucked-up[e] {
console.lol[e])))
} dont-fucking-care {
0)))
}
}
P.S.: Not sure about using words fuck
and shit
everywhere (may be considered offensive)
WTFPL – Do What the Fuck You Want to Public License.