Programming languages' semantic #15
MasterInQuestion
started this conversation in
Linguistic
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
"var" vs. "$var": Is it variable or keyword?
"print" vs. "print()": Is it keyword or function (or method, routine whatsoever) call?
"${Arbitrary Non-Sense's}"?
"${ /Array\d+(?:_\d+)?/ }"..?
"${Array${i}}"?
`${ "Array" + ( exist ${j} ? "${i}_${j}" : ${i} ) }`?
[[
print "123" "456"
print( "123", "456" )
]]
Significant overhead. But desirable for clarity. [1] [2]
Interactive vs. Canonical: shortcut for quick input.
[ [1]
`a 1 b 2`??? [ One such failure: SVG "d" [4]. ]
`a 1 $( b 2 )`: Unix Shell.
`a( 1, b( 2 ) )`: Classical functional. ]
[ [2]
Certain functionality expects no extra input:
E.g. `goto ":Label"` [3], "break", "break 2"
.
Wrapping the parentheses would be excessive. ]
[ [3]
[[
:Label for jump-back; a!
...
goto ":Label for jump-back; a!";
]] ]
[ [4]
More than 1 way to draw the same curve...
Much reminds me of the RISC vs. CISC design choice.
.
Extreme invert. Excess amok.
Further reading on SVG: https://github.com/MasterInQuestion/Markup/issues/2 ]
=== Pointer type (reference) cause ===
[[
${Variable to Meddle} = Hefty-Whatsoever();
${Name of Variable to Meddle} = "Variable to Meddle";
ObscureMeddling( ${Name of Variable to Meddle} );
]]
Pass by reference (to the original) [2] or pass by copy (where causes a new instance of "Hefty-Whatsoever" [1]).
"ObscureMeddling" may have different expectation.
[1] Though compiler may automatically reduce such overhead, to some extent.
[2] Also accomplishable by "eval" alike.
[[
${var}
\${ref}
${ \${deref} }
]]
... Where exactly C and Perl so on failed: over-abstraction.
(though not in exactly the same shape, much resembles)
=== Type casting directive ===
[[
[utf16( LE )]
[utf8( 2,048 )]
[str( 8,192 )]
[int( 7 )]
[bool]
[int64]
[float( 32, 8 )]
]]
Typeless can at the same time be strictly typed.
These are much used as memory allocation hint: no extra limit imposed on actual parsing.
Data, are no more than data. It is all upon: the interpretation.
[[![https://github.com/MasterInQuestion/Markup/blob/main/Counting.htm](https://github.com/MasterInQuestion/attach/raw/main/MasterInQuestion/Markup/2/Counting.p52.20.webp)
( [int8] 128 == all( -128, 128 ) ) == true
( -128 == 128 ) == false
]]
See:
=== See also ===
Relationship between high-level logic and low-level representation
https://github.com/MasterInQuestion/talk/discussions/24
Beta Was this translation helpful? Give feedback.
All reactions