News for hackers. Stuff that matters.
Re:Show HN: Sourcetrail – Get productive on unfamiliar sourc... by nebucnaut on Thursday June 22, 2017 @12:36PM (#14613441)
Yes, dynamically typed languages are much harder to tackle :/
Re:Show HN: Sourcetrail – Get productive on unfamiliar sourc... by dkarapetyan on Thursday June 22, 2017 @12:47PM (#14613513)
You don't need it to be fully automated. For dynamic languages you would have people in the loop to annotate the parts the tool couldn't figure out.
Re:Show HN: Sourcetrail – Get productive on unfamiliar sourc... by nautilus12 on Thursday June 22, 2017 @12:54PM (#14613563)
This seems like no better off. Documentation is historically always out of date the second its written. The same would be true for annotation.
Re:Show HN: Sourcetrail – Get productive on unfamiliar sourc... by dkarapetyan on Thursday June 22, 2017 @02:43PM (#14614353)
As noted by others the annotations would be active checks. More like proofs in coq than static text. That way you'd be building up a logical understanding of the code base that was machine verifiable sidestepping the issue of stale comments.

If done properly this could even feed into code dynamics to capture information on the runtime information. So that at every point in the program you could start asking questions like how many times did this line execute, what was the type of this variable at this point, how much memory was allocated, and so on and so forth.

Re:Show HN: Sourcetrail – Get productive on unfamiliar sourc... by nautilus12 on Tuesday June 27, 2017 @07:50AM (#14644466)
Seems like youve just abstracted things like static typing into a extension of the language thats checked at a less optimal time. At this point arent you better off just using a language that incorporates this functionality and compiles it? Sounds like youve just implemented static typing but in a really akward and unecessary way
Re:Show HN: Sourcetrail – Get productive on unfamiliar sourc... by diggan on Thursday June 22, 2017 @12:56PM (#14613587)
Guess you could have some assertions together with the annotations to make sure things are up-to-date. Then integrate those tests with your CI of choice and it should be a bit easier to keep up-to-date.
Re:Show HN: Sourcetrail – Get productive on unfamiliar sourc... by lallysingh on Thursday June 22, 2017 @03:15PM (#14614562)
You're best off getting traces from a modified runtime to annotate what's going on.