Talk:Bernstein basis polynomials: Difference between revisions

 
(7 intermediate revisions by 2 users not shown)
Line 13:
As for "Subprogram (1)", "Subprogram (2)", etc., these are not the names of subroutines. They are reference numbers, akin to "Equation (1)", "Equation (2)", etc. If you think these are stupid "names", then what about Donald Knuth using "Algorithm M" for a long multiplication routine, etc., in his classic ''The Art of Computer Programming''?
:: I would level the same criticism against the great DK, and be five times as vociferous had he used "Algorithm M1".."Algorithm M5".<br>
:: I don't actually know the book/text you refer to very well, but given the chance I might have said: at least call it "Algorithm LM".<br>
:: Further, there is a tiny hint M might stand for multiplication, but there is ''nothing at all'' in "Subprogram(1)".
 
And I do not see that merging the parts of the task would serve any purpose except to make the writing sound less like technical writing, and to make it easier for a reader to accidentally skip one part of the task.
Line 30 ⟶ 31:
As for why the Python code is full of descriptions of what I am doing, that is very simple to explain: the Python program is the first draft of the task itself! I composed the writing there. --[[User:Chemoelectric|Chemoelectric]] ([[User talk:Chemoelectric|talk]]) 00:39, 28 May 2023 (UTC)
:: You appear to have invented a criticism there I did not make. --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 01:40, 28 May 2023 (UTC)
Thanks for your input. We seem to belong to entirely different schools of programming. --[[User:Chemoelectric|Chemoelectric]] ([[User talk:Chemoelectric|talk]]) 10:59, 28 May 2023 (UTC)
::No worries, I made my case, it didn't stick, I'll not dwell on it. --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 08:07, 29 May 2023 (UTC)
 
I should like to make a comment on which I use the term "subprogram" when giving numbers to parts of the code to be written. It is simply that I can think of no programming language that uses that term in its syntax. We have "subroutine", "procedure", "function", "predicate", ... even "word" (that goes in a "dictionary"). But not "subprogram". "Subroutine" and "procedure" would be appropriate terms, but Fortran made it seem a "function" is not also a "subroutine", when the difference is merely syntactic. And what is a "function" and what a "procedure"? What Common Lisp calls a "function", Scheme calls a "procedure". Some other languages distinguish "function" from "procedure", while others call a "function" a "procedure". But "subprogram", although a dated term, does not have these problems.
::<small>(Just to be crystal clear, it is much more the "(1)" than "subprogram" I objected to --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 08:07, 29 May 2023 (UTC))</small>
 
As for what name one actually uses for a subprogram, does this not depend more on the traditions of a particular language than it does on the task at hand? One calls a predicate "whateverp" or "whatever-p" in Common Lisp, but "whatever?" in Scheme, even though both languages allow punctuation symbols in names. In other languages one writes "is_whatever", and in others "isWhatever" or "IsWhatever". In traditional Fortran (the language of LAPACK), one completely avoids names over six characters long, so it might be "WTEVER". (This is why LAPACK subroutine names are the way they are.) In my own examples here, I used entirely unlike names in different languages. (I have added ATS, Object Icon, and m4 since the initial two, which already had entirely different names for the parts.) We all have opinions on these things. I for one, dislike camel-case, and am annoyed if I can't use "| y = p(x)² |" as a variable name, as one can in Common Lisp or Scheme. --[[User:Chemoelectric|Chemoelectric]] ([[User talk:Chemoelectric|talk]]) 11:23, 28 May 2023 (UTC)
7,794

edits