You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is setting us up for a fencepost error: similar to running cat file | wc -l.
If you have a 3-line file without a newline at the end, wc -l will still return 3 because it's counting lines, not newlines.
Hi,
In the solutions to the exercises my_first_io and my_first_async_io, the variable to count the number of newlines is called "lines".
This is misleading since we are not counting the number of lines per se but rather the numbre of newlines, which are two different things.
e.g.
In the example above, we have 3 lines but only 2 newlines.
If I'm correct, we should find a better name for the variable.
If not, could you explain what I've missed?
Cheers,
Samuel
The text was updated successfully, but these errors were encountered: