Longest program parameter?
-
Ignores it and fucks off down the pub! What else do you expect to happen! :)
-
Nah, it is in the kernel. The execution just wanders off and does something else useful. :)
-
I've never used it, but I know it exists: InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState[^] :laugh: Apparently some Java Swing thing :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
Long indeed, but not a Program paramter.
-- Gisle V.
-
-
I just came across what I think it's the longest program parameter I've seen:
-Wno-incompatible-pointer-types-discards-qualifiers
This is from clang-cl; a sort GNU-C in MSVC cl clothing. Any longer?
-- Gisle V.
As long as it's meaningful, I always prefer a long name for methods, variables, properties... whatever you say. 'GetPersonName()' is preferable than 'GetPN()' or 'GetP()' etc. The most important thing is, you don't have to write self-documentation and the person on the other side still understand what the code works. Just my thoughts... :)
Vote up or Mark as Answered, if this information helped you.
Kind Regards - Kunal Chowdhury | Microsoft MVP (Windows Development), Windows 10 Champion
Checkout my 'Technical blog': http://www.kunal-chowdhury.com
-
I name some of my funcs as exactly what they do, even if it becomes something like: CheckUSBIDAndIfWeCanHandleItGetDescriptorData(...); Yeah, its a mouthful, but it dont half make the good freaking self documenting! :)
-
Munchies_Matt wrote:
it dont half make the good freaking self documenting
:) (please tell me that was sarcasm)
Nope. :)
-
I just came across what I think it's the longest program parameter I've seen:
-Wno-incompatible-pointer-types-discards-qualifiers
This is from clang-cl; a sort GNU-C in MSVC cl clothing. Any longer?
-- Gisle V.
not program parameter (/argument), but related: A few years ago, the group set down in our company to revise the coding rules tried to set a maximum source code line lenght of 80 chars. Our project leader immediately declared that our code was not to accept that limit: We had rules for creating C #define symbols that lead to symbols exceeding 80 chars (and every character in UPPERCASE). Actuall, we had several guys praising those rules (the same ones who were complaining about the 260 char file name length in FAT file systems). Going even further back in time: I was working for a company selling their own Fortran compiler. One customer hit one ceiling: A function could have at most 99 parameters; he had more than that. Another crazy hit-the-ceiling: A friend of mine had to extend a linker: Each module had an export table that was indexed by a signed 16-bit integer. One customer's project created a module which exported more than 32767 symbols. The quick fix was to double the maximum table size by making the index unsigned. The same project created a struct type definition of roughly 8300 lines of code. (That didn't break any limits, though.) If noone breaks a limit, that limit serves no real purpose... :-)
-
not program parameter (/argument), but related: A few years ago, the group set down in our company to revise the coding rules tried to set a maximum source code line lenght of 80 chars. Our project leader immediately declared that our code was not to accept that limit: We had rules for creating C #define symbols that lead to symbols exceeding 80 chars (and every character in UPPERCASE). Actuall, we had several guys praising those rules (the same ones who were complaining about the 260 char file name length in FAT file systems). Going even further back in time: I was working for a company selling their own Fortran compiler. One customer hit one ceiling: A function could have at most 99 parameters; he had more than that. Another crazy hit-the-ceiling: A friend of mine had to extend a linker: Each module had an export table that was indexed by a signed 16-bit integer. One customer's project created a module which exported more than 32767 symbols. The quick fix was to double the maximum table size by making the index unsigned. The same project created a struct type definition of roughly 8300 lines of code. (That didn't break any limits, though.) If noone breaks a limit, that limit serves no real purpose... :-)
Kind of related - many years ago we had someone join our team who was a one finger typist - literally. Used the caps lock key rather than hold down shift whenever he could, that sort of thing. When we cottoned on to this, method names in our libraries started to "evolve" under the guise of better clarity, so fg() became setDefaultForegroundTextColour() and cp() became setVirtualTextCursorPosition() and so on. this was before the days of intellisense and auto-completion, of course.
-
I just came across what I think it's the longest program parameter I've seen:
-Wno-incompatible-pointer-types-discards-qualifiers
This is from clang-cl; a sort GNU-C in MSVC cl clothing. Any longer?
-- Gisle V.
Some code generators get to having super long variables. In the 1990's at Sun Microsystems we had to fix a 'bug' in the compiler because variables went over the 256 character limit.