IRC Logs for #io Tuesday, 2014-02-25

*** irclogger_ has joined #io22:19
*** gatesphere has joined #io22:29
jerprologic, where'd you go?23:32
jerpdurbin, no, java enums are not sum types23:34
jerpdurbin, you have to do all the work for the constructors manually, and you can use as many different types as you want, so long as they're all int23:35
jeri should be able to do something like:23:35
jerenum Foo { Thing(int, String), Other(ArrayList) }; for instance23:36
jerand then instanstiate it like: Foo f = Thing(42, "lalala");23:36
jerbut you can't do that in java23:36
jerthis all is of course, unless i've missed some advancement in java enums over these years23:39
pdurbinjer: thanks, passed it along:
pdurbinprologic: you took irclogger_ with you on holiday? ;)23:45
*** aditsu has joined #io23:54
aditsujer: hi, I was asking about java enums and sum types, I don't think I understand your response23:55
aditsuenum Foo { Thing(int, String), Other(ArrayList) } is doable if you write 2 constructors23:56
aditsuoh, "Foo f = Thing(42, "lalala");" is not though23:57
aditsuthe enum values are constants, they're not types to instantiate23:58

Generated by 2.11.0 by Marius Gedminas - find it at!