jbirdoftheriverlands-deactivate:

astercontrol:

Thoughts on the word “counterpart”

So, since I’ve seen a number of Tron fics use “counterpart” for a program’s romantic partner…

…I’ve started to notice a thing in my own programming software.


BBEdit file menu, showing the option "Open Counterpart"
ALT


Now, I don’t understand what this means, because I don’t actually write programs. I use BBEdit for making html pages for my website (and also AO3 fics, because they need to be formatted like html pages).


And all I can find in the BBEdit support is this stuff in the release notes for version 9.6:


"Open Counterpart" can now be used for files which will be implictly created at save; for example, bbedit foo.h followed by an Open Counterpart command will open foo.cp if it can be found using the standard rules.ALT
"Open Counterpart" will ask Xcode for the file's counterparts when possible.ALT


…so, from that, I would guess that a program’s “counterparts” are other programs that are somehow vitally involved in its functioning.


…And that a program can have more than one of them.


Tron and Ram and Yori posed together (composite created by pasting together a few different black and white promo photos)ALT



… Others with more coding knowledge, please contribute more context if possible?

Ive never heard them referred to as counterparts to one another but it seems to suggest this feature is fancy mac talk for auto opening a code file when a corresponding header is saved. Its fairly standard. When big programs are written in c/cpp its common to use header files for things like constant definitions and declarations of functions that are then called in the programs code. Its very common in compiled languages that support conditional compilation to use code libraries distributed as files. In the case of c these are .h files, or headers. In this case it sounds like counterpart is being used to refer to paired files of .h and .cp sharing the same filename. So yes. You can refer to it as other code vitally involved in the function of a program. To draw a parallel you could more or less consider a header file as anologous to a python module. It declares and exposes functions seperate from the logic of the program where those functions will be called to facilitate code reuse and organization.

Thank you for all this!! Good info.

(I can totally think of Yori as Tron’s code library who keeps track of all the definitions and functions. Hah. He’s useless without her)