Log of the #nice channel on irc.freenode.net

Using timezone: Central European Time
* arjanb leaves02:47
* bonniot joins10:32
hi10:38
<Bluelive>ha10:39
* arjanb joins11:12
<bonniot>arjan, how are expression variables doing?13:46
<arjanb>not started coding yet13:48
<bonniot>I am wondering if the syntax:13:53
regtest.java.J.J.method(x);13:54
should try to reach only static methods or not
on the one hand that's the Java way
on the other hand, there is this proposal to allow qualified methods, in which case this could refer to an instance method too13:55
(if we use the class name for java instance methods)
<arjanb>i find that syntax odd for non static java methods13:58
i think you rarely need to use qualified non static java methods13:59
<bonniot>the same as for Nice: in case of ambiguity14:01
especially if you use the method as a value, not to call it
<arjanb>when using a method as value a qualified method looks the same wether it's static or not14:03
<bonniot>wdym?14:04
i don't want to make a special case for calls/value 14:05
it's the same currently
so if it's the same when as value, it will be always the same, which you don't like, no?
<arjanb>i agree not making a special case for this14:06
<CIA-3>03bonniot * 10Nice/ (2 files in 2 dirs):
In bytecode, an array with unknown element types needs conversion when used
as an Object[].
<arjanb>though i looks odd it will be used rarely in calls so no problem to me14:07
<bonniot>yes. the problem is that I got bitten by this, and I first thought it was a bug:14:08
mlsub.typing.Constraint.enter(cst);14:09
it happens that Constraint has both a static method enter(Constraint) and an instance method enter()
the static method calls the instance method when the arg is not null
I expected the call to go to the static method, because of the syntax (intuitively, not knowing about this issue)14:10
but actually it called the other one, because it is more precise (it is specialized for non-null values)14:11
<arjanb>i see
<bonniot>because of the default type importing scheme, the value was typed as non-null, but could in fact be null
so I wanted the static method...
<arjanb>bad api design from nice point of view14:12
<bonniot>why?
<arjanb>it impossible to write such code in nice because you will always get ambiguities14:13
<bonniot>if the value is non-null, it will call the instance method14:14
if possibly null, the static one
no ambiguity
<arjanb>but was the behavior in correct in your code calling enter?14:18
<bonniot>it had to call the static version14:29
is this what you meant?
<arjanb>yes14:31
* Bluelive leaves16:16
* Bluelive joins16:39
* Bluelive leaves17:10
* bonniot leaves18:14
* bonniot joins18:15
arjan, if you have time, could you look at the swing example to fix the compilation errors?19:38
i'll be away this evening19:41
<arjanb>i will look at it19:42
* Bluelive joins19:47
<bonniot>bye!19:48
<arjanb>cu19:49
<bonniot>have a nice evening :-)
* bonniot leaves

Generated by Sualtam