-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathideas
32 lines (24 loc) · 842 Bytes
/
ideas
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
30
31
32
todo: ! = #not(), ~ = #complement()
CompoundAssignment overload:
a += b <=> a.mutableAdd(b) or a = a.add(b)
increment/decrement:
a++ => a.postInc()
--a => a.preDec()
a+=b => a.addAssign(b) or a = a.add(b)
translate to pure java. like delombok
via pe.getFiler(), after Attr phase
bug:
lst[0] = lst[1] = 1;
extension methods
str.iterator() -> static Iterator<Char> iterator(String s)
import static StringUtils.iterator;
@Extension public static Iterator<Character> iterator(String s);
Flow dependent typing
final Object a = ...; if (a instanceof BigInteger) c = a.add(b) // without ((BigInteger)a).add(b)
null operators:
obj?.method() -> obj==null ? null : obj.method()
obj ?: "null" -> obj==null ? "null" : obj
String? s <=> @Nullable String s
String s <=> @NotNull String s
light syntax:
like python.