Skip to content

Latest commit

 

History

History
45 lines (24 loc) · 1.61 KB

smart-code.md

File metadata and controls

45 lines (24 loc) · 1.61 KB

Smart code

2019-09-18

Smart code refers to a special notation for writing variables.

Technically, a smart code is an alias for the BabyYaml inline syntax.

So for instance:

SmartCode Php value equivalent
hello string hello
123 int 123
12.3 float 12.3
null null
true true
false false
[a, b] array ["a", "b"]
{a: 123, b: 456 } array ["a" => 123, "b" => 456]
{a: 123, b: [e, t] } array ["a" => 123, "b" => ["e", "t"]]

Now this syntax is very flexible. As it turns out, it has been used in various ways, mostly to provide developers with a tool for creating custom notations on the fly.

Some examples include: