JeremyYao commented on PR #1410:
URL: https://github.com/apache/daffodil-vscode/pull/1410#issuecomment-3281960175

   > The new variable name doesn't really add anything. If anything, I'd 
suggest making it an inline comment, although I don't see this as too helpful 
either, as 4096 is a standard buffer size. I think noting why it's important is 
more helpful, but those more familiar with scala would probably find it 
unnecessary.
   > 
   > `.readOutputStream(4096) { os => // 4096 is the buffer size when consuming 
this stream via drain, through, compile, etc.`
   > 
   > What it looks like to me, is that whenever a new Parse object is created, 
there is a run function associated with it. When the return value of that run 
function is consumed, this chunk is used during the consumption process. 
However, I don't see anything that is actually consuming this stream. I see 
`.drain` and `.through(...)` being called on it, but those alone do not consume 
data.
   
   Magic numbers should be avoided in the event that the value may be needed to 
be re-used in the future and is something that should be avoided to promote 
self-documenting code. Given that there may not be anything consuming the 
stream and from your sentiments, it sounds like adding an inline comment 
wouldn't be necessary. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to