06:34 ilogger2 joined
lucasb so, "to keep an overall resemblance with Perl 6" is not one of the goals, right? 10:43
the None value looks like the regular unitary null value I would expect from other languages, like P5's undef, Python's None, Ruby and Common Lisp's nil. Is that correct? I mean, it's different from P6 Nil which acts like a "control value" that tells the containers to reset themselves. do you agree with this statement? :) 10:47
masak "resemblance with Perl 6" is neither a goal nor a non-goal 10:48
the important thing is to let the needs of macros (and slangs) set the terms of the design 10:49
with the implicit expectation that Perl 6 might have to do the same later as we re-integrate
I agree with that statement. `None` in 007 is basically Python's `None`. there are no magic side effects during assignment, etc. 10:50
on the other hand, I don't consider that to be an "essential" part of Perl 6. bet nqp doesn't have it, for example.
lucasb I asked if resemblance was a goal because I wanted to ask you what are the chances of convincing you to change (True, False, None) into (true, false, nil) ? Zero? :-) 10:51
I mean, "lowercase". Sure, not a important detail... but to me it matters :-) 10:52
I was surprised to see True and False in P6. It looks like Python and Haskell, while JavaScript and Ruby, which have a much closer relationship with Perl, have lowercase literal boolean values, instead of Capitalized ones 10:53
and if P5 had boolean values from start, I think it would obviouly have being lowercase, and P6 would have inherited that, and I wouldn't be talking about this in 2018 :-) 10:58
masak chances are nonzero. I'm still thinking about that one 11:19
see github.com/masak/007/issues/390
it's closed on Github but still open for discussion
I can totally see the argument for all-lowercase (or rather lower camelcase, but that's not used for those single words) -- the argument being that `true` and `false` (and `none`) are really *instances* of the enum, and if they were variables, that's how we'd write them 11:22
the case for `nil` instead of `none` is harder to make, I think. (a) Python has it as `None`, and Python is one of the "parent languages" of 007; (b) `nil` to me has connotations of "empty list" and "the false value" which I don't feel apply to 007's `None` value 11:23
lucasb with regard nil, ok I can see it reminds people of the empty list. I meant the "itemized" nil. 11:57
masak github.com/masak/007/issues/390#is...-442033343 11:58
lucasb I would hope for "my @a = nil" to be a 1-element array containing the single value nil
not the empty list
wait! 11:59
masak :)
lucasb no! don't come to any conclusion yet! I'm not finished :D
j/k 12:00
masak fine
but you should know I *am* ready to open an issue about `True False None` -> `true false none`
lucasb I like capitalized enums like 'enum Color <Red Blue Green>', and so, makes sense 'enum Bool <True False>'. I like the symmetry 12:01
I like that it endeds up as Bool::False, Bool::True
masak me too.
lucasb but I just think that booleans are *so* special that they deserver the *exception* of being called lowercase 'true' and 'false' for the convenience 12:02
masak hm, there's another issue right there. should probably expose them like that already, since we can.
lucasb: that's what I mean. we should be consistent across the board.
lucasb: or at least endorse a small number of convensions, like maybe `enum Color <red blue green>` and `enum Color <RED BLUE GREEN>` 12:03
I do like the argument though that if `red blue green` are in essence instances, then they should be lower camelcase for that reason
masak feels there's a distinct lack of reasons behind the current set of enum value capitalization practices in different languages 12:04
in all fairness, most languages also probably don't insist that `true` and `false` be enum values
lucasb to be honest, I don't feel 100% confortable with that fact that booleans are enums, but I accept it 12:10
as we can see, every thing is the same: class Bit {...}; class Bool {...}; my Bit b = 0|1; my Bool b = True|False; 12:11
enum Bit <0 1>; enum Bool <True False>;
The same way 'nil' is the only "singleton" value of the NilType, so is 'true' and 'false' the only "doubletons" of the Bool type. (?) 12:14
en.wiktionary.org/wiki/doubleton hehe it really is a word 12:16
(mathematics, rare) A set containing precisely two elements.
precisely definition is precisely
enums usually maps to integers... but 007 doesn't coerce True and False to 1 and 0 12:20
masak see (forcefully opinionated) discussion in github.com/masak/007/issues/157 13:17
I'm... willing to listen to reason, but I don't really see why `None` and `True False` *wouldn't* be booleans 13:25
it's like, if they weren't already in the language from the start, they'd be defined as booleans
er, "be enums" and "as enums" -- sorry, must be tired :) 13:26
lucasb "Ditto None". Sorry, is None a unitary enum value? 13:39
masak meant to be, yes 13:40
basically, `enum NoneType { None }` right now 13:41
lucasb ah, got it. thanks
masak 007 has this poetic idea that everything that's in the language should be at least in principle definable on the user level 13:50
lucasb and enums is the most easy way to define user-definable entities (correct?) 13:54
in this case:
enum NoneType <None>
enum Bool <True False>
if there was a "data" keyword instead of a "enum", it would be: 13:55
data NoneType = None
data Bool = True | False
so... "enum Foo <A B C>" is similar to "data Foo = A | B | C". would you agree? 13:56
but, doesn't enums implies coercibility to integers? whereas the "data" constructor doesn't say anything about coercing to ints 13:57
+True == 1 and +False == 0 # <-- I want that! 13:59
but I feel that "+None == 0" is strange
masak :) 14:01
I dunno. it's a strong-opinion-loosely-held, but I don't believe either of those make sense.
I might be convinced that 1 and 0 respectively are the "obvious" values for True and False to convert to 14:03
but I don't like the idea of those conversions being implicit anywhere in the language (like the `array[myBool]` example)
and I'm borderline-willing to force everyone to be explicit (with `myBool ?? 1 !! 0`) just to make a point about the to-integer conversion not being an obvious thing 14:04
I dunno :) like the last comment says, it's a tradeoff between purity and convenience 14:05
lucasb github.com/masak/007/blob/master/l...#L407-L409 16:57
hmm, contains returns an Int or Bool? 16:58
github.com/masak/007/pull/440 17:24
github.com/lucasbuchala/007/commit...9ba3d95777 All tests successful :) 18:18
18:54 AlexDaniel` left 19:14 AlexDaniel` joined 19:56 AlexDaniel` left 20:06 AlexDaniel` joined
lucasb dunno how to use git :-D 22:41
I trie to amend, but ended up creating multiple commits 22:42
is it possible to squash all into one? I can start over with a single commit if you wish 22:43
AlexDaniel` if you didn't push yet, then rebase is what you need 22:48
lucasb I'm trying to fix :-) 22:49
done :) 22:53
I resetted locally then "git push --force" 22:54
AlexDaniel` O_O 22:57