4 ms·
Could someone please elaborate his #1 a little bit (as I'm not familiar with C#)? For the first example, I don't see how it has anything to do with C#. For th
by fireattack 6y ago
Could someone please elaborate his #1 a little bit (as I'm not familiar with C#)?
For the first example, I don't see how it has anything to do with C#.
For the second example, I assume it works like Matlab? By "discard" it just suspends the print, but if you use something like `a = 1;` it still assign 1 to a? If so, I think it's perfect fine for notebook-like interactive shell.
- rco8786 6y agoSame question. It’s two entirely different pieces of code, even returning different types. Is the author upset that C# allows side effect mutations?
- strogonoff 6y agoCompiler didn't balk at unused return value. (Also by the sound of Format() the function is typed as returning a string, but the author didn't raise that issue.)
- rco8786 6y agoI see... seems a rather subjective take (IMO)
- xiphias2 6y agoBeing able to discard the return value in an interactive shell is not just ,,fine'', but actually crucial feature (the exact syntax for discarding is less important). Quite often the rendering of an object would take so much time, that the interactive shell would hang, or so much space that it's not worth to show it.