April 20, 2012
On Thursday, 19 April 2012 at 00:11:29 UTC, Andrej Mitrovic wrote:
> On 4/18/12, SomeDude <lovelydear@mailmetrash.com> wrote:
>> On Tuesday, 17 April 2012 at 08:00:36 UTC, Denis Shelomovskij
>> wrote:
>>>
>>> It's pity that a video is read-only and it isn't easy to fix
>>> slips of the tongue like this one. Maybe some notes can be
>>> added?
>>>
>>> Anyway, these (Andrei's and Walter's) videos are too good to
>>> not list them on the site.
>>
>> I've cleaned up the wiki a bit and added them:
>> http://prowiki.org/wiki4d/wiki.cgi?WhySwitch
>
> You could actually add them here and link to it:
> http://prowiki.org/wiki4d/wiki.cgi?Videos
> I made that page a long while ago but I didn't really know where to
> link it from, so I just put it in the first tab I found (The D
> Community: http://prowiki.org/wiki4d/wiki.cgi?NeighborHood)

Thank you, I didn't know this page.


April 22, 2012
I like your talk but how did you come to the conclusion that
min(a) does not make sense?

Cheers,
Famous
April 23, 2012
Famous:

> I like your talk but how did you come to the conclusion that
> min(a) does not make sense?

Do you mean the min of a single item is the item itself? This is right, but this case is better (more handy) left as function overload to ask for the min of a single given iterable.

Bye,
bearophile
April 24, 2012
On Monday, 23 April 2012 at 16:45:19 UTC, bearophile wrote:
> Do you mean the min of a single item is the item itself?

Yes.

> This is right, but this case is better (more handy) left as function overload to ask for the min of a single given iterable.

Would this transparantly work for an item and a set consisting of one item?

Of course, expressing an integer a by min(a) is not
straighforward. I do not expect anybody writing this explicitly.
Nevertheless, it seems to be a valid case. I was wondering
whether it could be useful in generative programming in order to
avoid a special case somewhere.

Cheers,
Famous
April 24, 2012
Famous:

> bearophile:
>> Do you mean the min of a single item is the item itself?
>
> Yes.
>
>> This is right, but this case is better (more handy) left as function overload to ask for the min of a single given iterable.
>
> Would this transparantly work for an item and a set consisting of one item?

I think min(A,B,...) is the min between two or more items.
While min(A) is the min of the items of the iterable A.

This means:
min([1,2,3]) => 1
min([[1,2,3], [1,2,4]]) => [1,2,3]
min([[1,2,3]]) => [1,2,3]

It works with with two ore more items, and with a iterable that contains one or more items.

In theory if you call min(1) it's able to see 1 is not an iterable, so it must be a single item, so it is the min. But I think this is a confusing special casing, that's better to avoid.

Bye,
bearophile
1 2 3
Next ›   Last »