Remix.run Logo
HappMacDonald 4 days ago

I am a huge protester to the "constantly abbreviating words" habit in coding. It may have had a place when source code space had drastic limitations, but today "func, proc, writeln, strcpy" are anathema to me. Also I get that a lot of these in Seed7 examples were lifted unchanged from Pascal, but that just means that I dislike those aspects of Pascal as well.

I am of the camp "use full English words", and "if the identifier is too long then spend the time needed to find a more concise way to say what you mean in fewer or shorter full English words". Incidentally AI can be pretty good at brainstorming that, which is lovely.

inkyoto 3 days ago | parent | next [-]

… yet you have contracted «artificial intelligence» to «AI», have not you?

The case for abbreviated keywords will always exist as some will prefer contractions whereas some will have a preference for fully spelled out words.

At the opposite side of the spectrum there C / C++ that use neither for functions and procedures but «printf» and «strcpy» – as you have rightfully pointed out which ADA, COBOL and Objective C contrast with

  ADA: «Is_Valid_User_Access_Level_For_Requested_Operation», «Convert_String_To_Standardised_Date_Format»

  COBOL: «PERFORM Calculate-Totals VARYING Index FROM 1 BY 1 UNTIL Index > Max-Index»

  Objective C: «URLSession: dataTask: didReceiveResponse: completionHandler:»
I do not think that a universal agreement on the matter is even possible.
HappMacDonald 2 days ago | parent [-]

Well the threshold I would like to use is "abbreviations that are easily understood outside of coding jargon are acceptable". You don't have to be a specialist in any specific language to understand "AI" in the wild, or "NASA" or even the names of languagues such as COBOL.

But if outside of the context of coding you just say "strcpy" or "writeln" at somebody they're not going to immediately understand. As a result, even coders with tired brains or who are switching between languages a lot will also get hung up at inconvenient times.

Jtsummers 4 days ago | parent | prev [-]

`func` and `proc` are types in this language, so you could define `procedure` and `function` if you want.

The other uses of `func` should be changeable with the flexible syntax extensions the language offers, but I haven't dug into that.