4 ms·
“HOW TO RETURN” for something as common as “def” is crazy!
by volemo 11mo ago
“HOW TO RETURN” for something as common as “def” is crazy!
- mg 11mo agoWell, not as bad as something like public static function words(string $document): array { which some languages these days are coming up with.
- volemo 11mo agoWhile I agree, at least here every word, though is verbose, at least means something, whereas “HOW TO RETURN” carries no more meaning than “def”.
- mg 11mo agoAs I understand it, "RETURN" means that the function will return something. And that when you define a function that returns nothing, but only does something, you just use "HOW TO".
- tim333 11mo agoI guess it's a shortening of "here's how to return the words in a document". I think def is good though. I guess with new fangled prompt engineering you could use the english version.
- amypetrik8 11mo ago> public static function words(string $document): array { >, though is verbose, at least means something I disagree, it is hardly verbose. there can be further detailing of the input and return value of the function beyond a simple type. Java didn't go far enough, not by a long shot - we need hardcore painstaking, completely brutal typing. Such typing will be highly beneficial for software reliability - you're not against reliability are you?
- az09mugen 11mo agoReminds me if tabloid language, were the translation would be : DISCOVER HOW TO words WITH document
- mg 11mo agoDISCOVER THE SHOCKING TRUTH ABOUT HOW TO hello WITH name: PRINT "hello " + name