April 28, 2012
On Saturday, 28 April 2012 at 03:19:19 UTC, Era Scarecrow wrote:
> becomes:
>
> int c = {a = b; b = 7; 8;};
> int c = {a = b; b = 7; return 8;};
>
>  Like this it looks less like a function call and a scope instead; but still returns something from a scope as it's return value. Although then it's almost a lambda function, except without calling parameters. Mmm thoughts?

I tend to edit my text all over the place so sorry.

The first one {a = b; b = 7; 8;}; was suppose to have a note it would error while assigning value of void return value.

 Using the blocks/scope makes the book example look less like a function call; But can still return something from a scope as it's return value. Although then it's almost a lambda function except without calling parameters.

 Most likely it wouldn't return anything, if you needed a return you use a lambda instead. So:
 a = b; b = 7;
 int c = 8; //returns void so there is simply no block

 or

 int c = (){a = b; b = 7; return 8;};
April 28, 2012
David Nadlinger wrote:

> quite a bit more fruitless than the one you were commenting on

May be. But then a definition of fruitfullness is missing.

Walter once changed the language because a change of a "." to a "," or
vice versa might change an actual parameter list from
|  (1,2.3)
to
|  (1,2,3)

That is a distance of zero for characters and token.

The problem presented here shows distances of about twenty characters or four token.

Does fruitfullness reach up to hundred characters or ten tokens? Please specify the upper bound.

-manfred

April 28, 2012
On Saturday, 28 April 2012 at 06:44:08 UTC, Manfred Nowak wrote:
> Does fruitfullness reach up to hundred characters or ten tokens?

The point I was hinting at is that abstract lexical distance isn't necessarily a valid metric for how similar two snippets of code appear to be, resp. how easy it is to make hard-to-find mistakes in a hurry.

On a related note – and please do not take this as a personal attack, but rather as a suggestion how your participation in online discussions might become more, uhm, fruitful – I sometimes wonder if you deliberately try _not_ to understand other people. Communicating, let alone doing so efficiently, doesn't work that way.

David
April 28, 2012
David Nadlinger wrote:

> how similar [...]
> how easy [...]
> Communicating [...] doesn't work that way.

If someone has a usable definition on how to communicate or find similarities _easily_ then please show up.

Such a definition is the start for splitting them into possibly intended software clones and unintended but syntactically correct mishaps.

-manfred


1 2 3
Next ›   Last »