-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01-paradox-discovery.err
More file actions
29 lines (25 loc) · 915 Bytes
/
Copy path01-paradox-discovery.err
File metadata and controls
29 lines (25 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# SPDX-License-Identifier: MPL-2.0
# Example: Paradox Discovery
# Learning: Discover the context-collapse keyword paradox
main
# This looks normal...
let end = 42
println("The value of end is:", end)
# But wait - 'end' is also the block terminator!
# How does Error-Lang know which one you mean?
# Try moving this to different indentation levels
# Try renaming to 'end_value'
# Notice how stability changes
end
# ⚡ EXPECTED PARADOXES:
# - Context-collapse keyword: 'end' is both identifier and keyword
# - Depends on depth: depth 1 (inside main) → identifier
# depth 0 (at main level) → keyword
#
# 🎓 LEARNING OUTCOME:
# Keywords are context-sensitive. Position matters.
# This is why most languages ban keywords as identifiers!
#
# 💡 STABILIZATION:
# Rename to 'end_value' → stability: 100
# Keep as 'end' → stability: 85 (context-dependent)