Comments (1)
Thanks for the references. Here's what I'm currently thinking for optionals:
Option declaration:
var a ?Foo = none
var a = ?Foo.none
var a ?Foo = [Foo:]
var a = some([Foo:])
Get value or panic: a!
For optional chaining, returns last access or none: a?.b?.c
Chain but fail at first none encounter: a!.b!.c
If a is dynamic it can just be a.b.c
For null coalescing:
var res = a else 123
var res = a else:
break 123
from cyber.
Related Issues (20)
- Jupyter Kernel HOT 3
- Is it possible to Implement a Cyber repl HOT 3
- RFC: Replace CYON with JSON5 HOT 1
- README links are broken HOT 1
- Independent Benchmarks HOT 1
- Embeddable static library undefined symbols HOT 6
- Error occurs when compiling the examples - undefined symbol: execBytecode. HOT 4
- Implement Fiber.reset HOT 1
- Unstable zig package for tooling HOT 12
- Revising data literal syntax. HOT 1
- Hot Reloading? HOT 1
- Printer functions seem to duplicate output prefix HOT 3
- CLI / wasm HOT 2
- Add multi -thread support HOT 1
- findAnyRune return unexpected index HOT 2
- Document description is inconsistent with interface specification HOT 1
- android build support HOT 6
- "TODO" error when defining out-of-body $call for type trait HOT 2
- Feature request: expose a zig module HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyber.