News for hackers. Stuff that matters.
Re:It's not what programming languages do, it's what they sh... by z3t4 on Friday March 27, 2020 @03:34AM (#22701002)
IDE's are good at treating the symptoms. But it's also possible to write the code so that you don't need an IDE to untangle it: For example keeping all variables within (file) scope, and abstracting out into reusable (reusable elsewhere) libraries.
Re:It's not what programming languages do, it's what they sh... by jcelerier on Friday March 27, 2020 @04:17AM (#22701167)
do you never have to check for all the calls to a given function in large-ish programs ?
Re:It's not what programming languages do, it's what they sh... by z3t4 on Friday March 27, 2020 @06:56AM (#22701834)
You can make functions pure and specific so they rarely need to change. And use name-spaces and naming conventions - so the variables can be found with grep (find in files).

Lets say you are upgrading an API, lets call it "HN", to a new major version, which has made a breaking change by renaming HN.foo to HN.bar. Now if you have always named the API "HN" you can just make a "replace in file" operation where you replace HN.foo with HN.bar - after you have already checked that there is no HN.foobar (to prevent HN.barbar)

Even sophisticated IDE's will have trouble following functions in a dynamic language that is passed around, renamed, returned, etc. So I would never trust an IDE to find all calls-sites.

Heavily depending on an IDE or tooling can also lead to over-use of patterns and boilerplate that the IDE handles well. And unnecessary work like adding annotations just to satisfy the tooling.

Re:It's not what programming languages do, it's what they sh... by anonymoushn on Friday March 27, 2020 @06:35AM (#22701718)
Not GP, but for most programs I write myself I cannot find all the call sites of a certain function because of using first class functions a bunch. When I worked in nginx I had a smaller amount of similar trouble, since nginx frequently but not pervasively uses function pointers to decide what to do next.