]> ocean-lang.org Git - ocean-D/blob - WhyNot
Merge branch 'master' of 192.168.20.231:GIT/ocean-D
[ocean-D] / WhyNot
1
2 Why not Go:
3
4  - numeric literals are typeless.  This is really neat.
5    1.0 can be an integer in the right context.
6    500 can be a float.
7
8    However string literals are not.
9      '4' is a Rune literal
10      "4" is a string literal
11
12    Why?
13
14  - value = foo()   can throw an error
15    value,err = foo() will instead return an error status in err.
16
17    value = <-chan   can block
18    value,ok <-chan  will not block, but ok will say if it wanted to.
19
20    But different things should look different...
21
22
23
24
25 Why not Rust:
26
27  - everything is an expression... What about while loops?