|
Post by N. De Plume on Sept 30, 2011 12:52:25 GMT -5
The main function should return 0 unless HOLY FUCK ERROR. That has to do with the OS, though; the language doesn't care about that. In a post creation subfunction, I would use return void, and use proper error handling other than ancient error return codes. The language of your snippet is object-oriented, after all (post.submit()), and so has most likely exception objects and a try-catch syntax. So let’s assume the 1 is used for something other than error handling. Something with some, unknown yet legitimate purpose. I did say many are object-oriented, even most or nearly all. I just really needed some way to transition from the explanation of the thread title to the object-oriented paradigm brought up by murdin, and I didn’t want to get into to much history. Not that I’m an expert in programming history, as I learned all this stuff well after OOP became the dominant paradigm. ;D
|
|
|
Post by RavynousHunter on Sept 30, 2011 15:41:08 GMT -5
Wait a minute...wouldn't you want to return a constant reference to an instance of a Post class for a post creation function? I can understand if it were the rendering subroutine...but creation would lead one to assume that there's a non-void return value.
|
|
|
Post by MaybeNever on Sept 30, 2011 15:57:37 GMT -5
You guys are nerds. Nerds, I say.
Now if you'll excuse me, I have to go watch Star Trek.
|
|
|
Post by RavynousHunter on Sept 30, 2011 17:55:33 GMT -5
Ey, least my nerdery stands a chance at getting me a decent job!
MAH JERRRRRRRRRRRRRRRRRRRBS!
|
|
|
Post by rachael on Sept 30, 2011 21:34:03 GMT -5
I actually have heard of this from my father. It struck both him and me as the Church pandering to the traditionalists because well, they always do that. It also annoys me greatly that they're insisting that only direct word-for-word translations are valid now. Comprehension be damned, we have to use the Latin loanwords just because that's what are used in Latin. It's like they have no idea of how translation really works. Since I'm interested in languages, that pisses me off, just like the arguments of weeaboos that Japanese has "subtle nuance" that cannot be conveyed in English without keeping gratuitous Japanese words in. At least now we know it isn't only Japanophiles who do that. What your father and the weeaboos say is technically correct. Not just about Latin and Japanese, but about all language. Or to be more accurate, about translation between any two languages. There are some things that just don't translate well from one language to another. And a translator has two options: They can leave in the word, as it is, and add a footnote or something explaining what it means (in the case of a regularly recited prayer, this meaning might be taught in Sunday School or there might be an explanation in the prayer book), or they can pick the closest phrase in the language they're translating the work into. Each option is helpful, depending on the situation. To the main topic...I was also raised Catholic. What bothers me is that they've recently changed the reading from the Gospel when Jesus offers his flesh and blood (i.e., the bread and wine). When I grew up, he said, "[My blood] will be shed for you and for all," and now they've changed it to "[My blood] will be shed for you and for many." Supposedly it's more faithful to the original text, but I hate it, because it's like, "Just your friendly reminder that some people are going to burn eternally in hell!"
|
|
|
Post by Yla on Oct 1, 2011 8:12:53 GMT -5
I will not continue to reply to this off-topic discussion. I will not continue to reply to this off-topic discussion. I will not ... ah, fuck it. So let’s assume the 1 is used for something other than error handling. Something with some, unknown yet legitimate purpose. Wait a minute...wouldn't you want to return a constant reference to an instance of a Post class for a post creation function? I can understand if it were the rendering subroutine...but creation would lead one to assume that there's a non-void return value. For example. My fault, I didn't think this through.
|
|