Quoting constructs: Difference between revisions

BLC data embedding
m (Corrected a spelling mistake in a comment.)
(BLC data embedding)
 
(One intermediate revision by one other user not shown)
Line 147:
AB"C
</pre>
=={{header|Binary Lambda Calculus}}==
The ability to embed arbitrary binary data of any length with zero overhead is one of the defining features of BLC, in which a closed lambda term is parsed from the start of the programs, and then applied to the rest of the program, making the latter the quoted part. Even the simple hello world program, which in BLC is <code> Hello, world!</code> follows this pattern, with the initial space encoding the lambda term <code>\x.x</code> for the identity function.
 
The restriction is that only one string of data can be so embedded. If we need to embed more pieces, then we can concatenate self-delimiting descriptions, which incur some logarithmic overhead, e.g. by use of the Levenshtein encoding.
 
=={{header|BQN}}==
 
Line 1,093 ⟶ 1,098:
 
Here are some examples of all this.
<syntaxhighlight lang="ecmascriptwren">import "./fmt" for Fmt
 
// simple string literal
56

edits