<< Back to previous view

[TNS-14] Wasted call to str in read-ns-decl Created: 02/Dec/13  Updated: 10/Jan/14  Resolved: 02/Dec/13

Status: Closed
Project: tools.namespace
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Trivial
Reporter: Andy Fingerhut Assignee: Stuart Sierra
Resolution: Declined Votes: 0
Labels: None


 Description   

The function read-ns-decl (both copies in each of two namespaces) contain the expression:

(doto (read rdr) str)

This is equivalent to (read rdr), plus a wasted call to str whose return value is discarded.



 Comments   
Comment by Stuart Sierra [ 02/Dec/13 12:07 PM ]

The call to str was added to force the Clojure reader to throw exceptions immediately when it encounters a syntax error. See TNS-1

Comment by Andy Fingerhut [ 02/Dec/13 4:20 PM ]

Sorry for the noise. I was trying out pre-release version of Eastwood linter on as many contrib libraries as possible, and it found that odd-looking code. It didn't occur to me to look through the commit history to see when it became like it was, and why. Subtle.

Comment by Stuart Sierra [ 10/Jan/14 11:26 AM ]

Mark old resolved issues as 'closed'

Generated at Sat Jul 26 14:23:47 CDT 2014 using JIRA 4.4#649-r158309.