10:12 <@EastByte> deen: are you there? 10:13 <@deen> EastByte: yes? 10:14 <@EastByte> why can't I 'redefine' enums in nim? 10:15 <@EastByte> type enum1 = enum none 10:15 <@EastByte> type enum2 = enum none 10:16 <@EastByte> Error: redefinition of 'none' 10:16 <@EastByte> do I really have to put a prefix before every enum? 10:16 <@EastByte> I thought I can use it like enum1.none then 10:16 <@EastByte> (context dependent) 10:19 <@deen> make the enums pure 10:19 <@deen> (i think) 10:21 <@deen> type enum1 {.pure.} = enum none 10:21 <@deen> then you can only access it as enum1.none 10:22 <@EastByte> hm, okay works 10:22 <@EastByte> but it's not handy to use that everywhere 10:23 <@deen> in what way? 10:23 <@EastByte> if a var is of type enum1, none should automatically resolve to enum1.none 10:24 <@EastByte> typing enum1.... everywhere is like having a prefix before each enum 10:24 <@EastByte> which feels like C 10:25 <@deen> which language has what you want? 10:25 <@EastByte> I don't know any :p 10:25 <@deen> haha 10:25 <@EastByte> but I think it's kind of obvious to support that 10:25 <@deen> i think it's difficult to support that consistently 10:26 <@EastByte> but it's like with var assignment and function calls 10:27 <@deen> in Haskell it also fails 10:27 <@deen> how is it like var assignment and function calls? 10:27 <@deen> if you write "var x = None" what would happen? 10:28 <@EastByte> I mean nim knows what function to call by its full prototype and you don't even have to specify parameter types because nim detects them automatically 10:29 <@EastByte> assigning var a : enum1 = none is so much easier than that I think 10:29 <@deen> no it's not 10:30 <@deen> you probably need overloading based on return type (which Nim doesn't have yet) 10:30 <@deen> and full HM type inference to use it comfortably 10:30 <@deen> There was a discussion about this: http://forum.nim-lang.org/t/732 10:35 <@EastByte> well, this is basically what I need in my current case: http://forum.nim-lang.org/t/732#4745 10:36 <@EastByte> "Java handles enums specially in switch statements", okay special case 10:39 <@EastByte> Araq's last argument makes it kinda clear 10:39 <@EastByte> but macros allow me to do everything anyway :p 10:42 <@deen> EastByte: what about putting the enum into separate modules? 10:43 <@deen> (haven't tried, just an idea) 10:44 <@EastByte> what would be the purpose? 10:45 <@deen> then their children can have the same name 10:46 <@deen> their elements* 10:46 <@EastByte> meh, Error: type mismatch: got (asd1) but expected 'asd2' 10:46 <@deen> but you'll always have to use the module name as an identifier for the ambiguous one 10:46 <@EastByte> var t : asd1 = none 10:46 <@EastByte> var t2 : asd2 = none 10:46 <@EastByte> interesting 10:47 <@EastByte> yes, works 10:47 <@EastByte> might be usefull in some cases 10:47 <@deen> Funny because I just got the idea via a Nim forum question: http://forum.nim-lang.org/t/1080/1#6613 10:48 <@EastByte> ah 14:00 < heinrich5991_> deen: swift has that btw 14:01 <@deen> ok 16:42 < o_be_one> hi : 16:42 < o_be_one> :) 16:49 < Nimda> Camouflage by Meliodafu just released on Novice at 2015-03-27 16:43 20:55 < seymour__> is there a command for switching to the other player in a team when spectating? 21:32 < o_be_one> seymour__, yes in key settings you can, there is something to just click player name in TAB if i remember well :).