Pere Casafont
03/03/2018, 6:24 PMAndreas Sinz
03/04/2018, 8:44 AMPere Casafont
03/04/2018, 11:26 AMAndreas Sinz
03/04/2018, 1:00 PMreadonly-operation?
2. If you have a const foo: Foo, is it ok to pass it into a fun bar(foo: Foo) or is it necessary to annotate the parameter with const too?Pere Casafont
03/04/2018, 2:44 PMPere Casafont
03/04/2018, 2:45 PMAndreas Sinz
03/04/2018, 3:40 PMPere Casafont
03/04/2018, 3:41 PMPere Casafont
03/04/2018, 3:42 PMPere Casafont
03/04/2018, 3:46 PMPere Casafont
03/04/2018, 3:48 PMval thing = MyThing()
thing.readOnlyOperation()
functionForReadOnly(thing)
the fact that thing is const/readonly can be statically proven, so it wouldn't need any extra keyword in its declarationPere Casafont
03/04/2018, 3:48 PMAndreas Sinz
03/04/2018, 3:50 PMconst thing, does it throw an exception or is it not allowed (compiler error)?Pere Casafont
03/04/2018, 3:52 PMAndreas Sinz
03/04/2018, 4:26 PMList example, how would Variance work with a const List<T>?Pere Casafont
03/04/2018, 4:41 PMPere Casafont
03/04/2018, 4:44 PM