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

Using timezone: GMT+01:00
* arjanb leaves02:13
* Quick-Nic leaves09:04
* arjanb joins10:37
* bonniot joins21:09
<bonniot>good to have multiline strings :-)
is it necessary to remember which literals were multiline (the multiline field)21:11
it doesn't seem used
<arjanb>oops i wanted to use it for printing21:12
<bonniot>i don't think it's necessary21:13
<bonniot>also, please check the diffs before commiting, there was some spaces at the end of a line that were useless21:15
could you commit those changes?23:09
I just wrote a page about the custom constructors:
<arjanb>sorry i was busy23:12
i will fix these details
these custom constructors is a good minimal addition23:16
what happens in case of an existing class23:17
<bonniot>you mean a Java class, or a Nice class in another package?23:18
<bonniot>which one?
<bonniot>well, for a java class you cannot add a new constructor23:19
for a nice class you should be able to
what do you think of how dylan can do things: http://www.gwydiondylan.org/gdref/tutorial/abstract-classes.html23:22
the overriding make part i mean23:24
<bonniot>this is essentially a normal method23:26
nothing special, except the syntax
but I think it could be nice to be able to overload `new C`
that's why I proposed the syntax C(...) { ... } for the custom constructor23:27
so you could have
C new C(...) { ... }
which is a method, not a constructor (cannot be called by a subclass constructor)23:28
<arjanb>if you can overload new C then it's easier to change the implementation of some classes without breaking code that use it23:29
that's good23:30
for instance by creating a subclass of C, right?
<bonniot>do you feel like adding the overloading of new?23:33
<arjanb>not sure i'm not familiar with the constructor part of the compiler ye23:35
anyway i'm busy the next 3 days so i won't start bigger things before sunday23:36
"except the last instruction: it must be a call of the form new C(...), "23:55
why not this(...) as in java?23:56
or: new this(...)
or return this(...)00:10
i think Class(....) = ... should be allowed00:11
<bonniot>the overloading of constructors does not technically have much to do with constructors: they are normal methods with a funny name, that's all00:44
wdym by your last line? example?
<arjanb>comment to your wiki page00:45
<bonniot>now I think the last instruction should not have 'new', because it is not creating a new instance
and it's not a return either, more a void call00:46
so it could be either C(...) or this(...)
'this' might be confusing, because it is usually a reference to an object, not a method/constructor00:48
<arjanb>java does the same in constructors
<bonniot>i know
<arjanb>so you prefer C(...) ?00:50
<bonniot>needs more thinking
maybe, not sure yet
are you making a comment on the wiki page?00:51
<bonniot>you said "comment to your wiki page"
<arjanb>confusion of mine00:54
why not multiple exits in a custom constructor?
<bonniot>it's possible, just more complex00:56
<arjanb>if they are compiled to ordinairy methods how could you call them from java?00:58
<bonniot>custom constructors or overloaded constructors?01:03
<arjanb>custom constructors01:21
btw i think overloaded constructors almost only usefull for interfaces and abstract classes01:23
<bonniot>cc are compiled to jvm constructors01:34
<bonniot>oc can be useful for a class too: if it must return a subclass in some cases
<arjanb>overloaded constructors is a confusing name i think01:36
custom constructors do overloaded the default constructor in some way
dylan calls it overriding make01:39
btw you have to update niceswing to make it compile again01:40
<bonniot>yes, overloaded creators might be a better name01:45
<arjanb>overloaded -> overrided?01:46
<bonniot>if you know what's wrong with niceswing you can update it!
<arjanb>the automatic test fails on one machine01:47
<bonniot>overriding is specialization of a method in a subclass