Inconsistency in parameter order for callbacks and handlers

Inconsistency in parameter order for callbacks and handlers

par Bastien Wermeille,
Nombre de réponses : 1

Hello,

Just a small note which could be change for next homework to bring a bit more consistency and avoid issues.

The signature to handle messages is the following :

```go
ExecuteHandler(f interface{}, f2 *net.UDPAddr)
```

Whereas the signature for a callback is:

```go

type NewMessageCallback func(origin string, message GossipPacket)

```

It could be great to have always the same order for the parameters so "origin, message" or "message, origin" but not both changed for the next homework.

Best regards,

Bastien

En réponse à Bastien Wermeille

Re: Inconsistency in parameter order for callbacks and handlers

par Cristina Basescu,

Hi Bastien,

Thanks for the suggestion.

Because we aim to have the homeworks backwards-compatible (i.e., the tests for homework 0 should still pass on homework 1, 2 etc), we won't make the change for this year. However, we'll take your suggestion into account for next year.

Cristina