Answers.Body: <p>Of course it is highly relevant. Optimally, you would prefer to start teaching with a more high-level language like Python, not low level one as C or assembler, nor outright bugged one as C++. Otherwise, you are going to have to flood the beginners' minds with insane amounts of details that are completely irrelevant from a beginner's point of view before they are capable of writing even a simple &quot;Hello World&quot;; the students would get the impression that programming is about memorizing gibberish, magical incantations that most often look like badly misspelled words, like <code>main(int argc, char **argv)</code>, <code>scanf(&quot;%d&quot;,&amp;x)</code> or <code>.globl _start:</code> instead of being about logical algorithmic thinking. Best strategy for satisfying teaching/learning experience is to teach students the most powerful concepts in the context of their current knowledge levels -- otherwise, it is more reminiscent of regurgitating loose pieces of information in the students' general direction, rather than teaching them to do anything useful.</p>
  <p>Let's say that all they know is printing and reading from the terminal, and you want to teach them how have a program ask for user's age and name, and then print a personalized greeting message using that age and name. It is much less productive and pleasant if beforehand they are forced to learn a bunch of completely irrelevant details for the time being, like in case of C: the concept of a call stack, the difference between how a computer treats numbers versus lines of text, the fact how the numeric variable is storing the number like one would expect but the variable representing line of text actually only stores an address of a remote location where the line of text begins, difference between passing by value versus passing by reference, the fact that arrays are similar to pointers but also not really that similar -- which is all required before one can fully comprehend why the cryptic gibberish incantation for reading a line of text with &quot;scanf&quot; does not need an ampersand added to the name of variable representing a line of text, while the ampersand is needed in case of reading a number. In such case, students are forced to learn a whole lot of details that won't be actually useful for them until much later in their education, and that is discouraging. Good education is about filtering the information you are passing to students to distill the most relevant pieces, not about regurgitating all the random and unrelated chunks at them.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-16T20:44:23.007Z
Answers.Text: (Not your downvoter, BTW). But when you say "Optimally...", you are expressing a personal choice (which I happen to agree with), but not a law of nature. There are lots of folks who want to teach a purely bottom up curriculum, following the historical development too a large extent.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-17T08:17:56.123Z
Answers.Text: As @Buffy said, "optimally" is highly opinionated and unlike Buffy I would doubt that very much. "outright bugged one as C++", ah what? If you are using `.global_start:` as an example why you shouldn't use C++ as a beginner language you are doing something VERY wrong. It takes about 10 minutes time to turn C++ into a beginner friendly language. I have used cin/cout perfectly fine without any callstack knowledge and I'd argue the difference between numbers and strings is one of the five most fundamental things in CS. Arguably Pythons "I'll do whatever the f*%& you want" approach can produce
Answers.UserDisplayName: Max
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-17T08:45:24.363Z
Answers.Text: fast result but can be detrimental to actual understanding (as I said arguably, both have pros and cons but you make it seem like anyone who learns the difference between int and char before their fourth year, will be scarred for life). Overall your answer gives off the sentiment of either "CS students must, under no circumstances, be challenged at all" or just an outright rant about a worst possible teaching practice (while twisting arguments in a weired way).
Answers.UserDisplayName: Max
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-18T20:45:32.877Z
Answers.Text: @Max C++ is indeed heavily bugged and there are a lot of different examples. For instance, would you guess what does `cout<<ptr` do if `p` is a pointer to a volatile variable? [Legit and totally reasonable behavior -- it's not bug, it's a feature!](https://stackoverflow.com/q/2501737) Another example is [buggy std::vector behavior](https://stackoverflow.com/questions/14603395). `.globl _start:` is a line from assembly language that I listed as one of three examples, it is not C++. _"CS students must, under no circumstances, be challenged at all"_ would suggest that Python is {continues}
Answers.UserDisplayName: NOT CSEducator
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-18T20:45:46.560Z
Answers.Text: @Max never challenging, which is puzzling to say at least.
Answers.UserDisplayName: NOT CSEducator
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-15T17:47:42.847Z
Answers.LastActivityDate: 2022-05-16T19:49:21.110Z
Answers.LastEditDate: 2022-05-16T19:49:21.110Z
Answers.UserDisplayName: NOT CSEducator
Answers.Body: <p>The choice of starting language is relevant in its ability to keep a students interest. In the early days of the micro computer BASIC developed itself as the ultimate learning language. It was ubiquitous, part of all of the early micro computers. Popular dialects such as MS BASIC, Apple BASIC, Commodore BASIC all were easy to start with providing quick and impressive feedback almost immediately. Once you got rolling you could build nearly anything with BASIC that the computer was capable of. I doubt I would have become a professional programmer if not for BASIC.  You could get your start easily on your own, and without switching languages accomplish something truly impressive.</p>
  <p>On the flip side BASIC was reviled by most of industry and academia because of the &quot;bad habits&quot; it taught. If you want to be simultaneously impressed and horrified pick up a back issue of <a href="https://archive.org/details/creativecomputing" rel="nofollow noreferrer">&quot;Creative Computing&quot;</a> or the book &quot;Games in BASIC&quot; by David Ahl.</p>
  <p>Most modern languages are both a hit and a miss when it comes to learning how to program.</p>
  <p>Block languages will get you started, but are rarely flexible enough to do anything real. You can do anything in C/C++ but pointer notation is incomprehensible to most newbies. Java eliminates the need for memory management, but the cross platformness of it make doing anything impressive problematic. Javascript is straight forward and ubiquitous, but is overly focused on the web. Python comes close, but its syntax encourages incomprehensible one liners that can scare even practiced coders away.</p>
  <p>The language you start off with matters... but it won't really make a difference. All programming languages are both perfect and horrible.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-16T14:46:29.673Z
Answers.Text: Thanks for the link to Creative Computing, I magazine I didn't know.  The first article in the first edition there was a review of my first ever computer (Jupiter Ace).  Some of Ahl's games (e.g. Hamurabi) make nice exercises or mini-projects for introductory programming courses.  Unfortunately "someone" is making a website of translations of the programs into more modern languages, which rather detracts from that (https://github.com/coding-horror/basic-computer-games).
Answers.UserDisplayName: Dikran Marsupial
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-16T13:23:27.043Z
Answers.LastActivityDate: 2022-05-16T13:23:27.043Z
Answers.UserDisplayName: codingCat
Answers.Body: <p>My 2cents on this topic. I certainly do not know if the first programming language has life long impacts (as an old guy whose first programming language was COBOL I sincerely hope there is none :-)</p>
  <p>But there are measurable effects of the programming language in relation to students outcomes in a CS1 course. Let me unashamedly plug in my own research <a href="https://dl.acm.org/doi/abs/10.1145/3152894" rel="nofollow noreferrer">https://dl.acm.org/doi/abs/10.1145/3152894</a> (this is behind pay wall - there is a non pay-walled version <a href="https://www.researchgate.net/profile/Jacques-Wainer/publication/327005495_A_Controlled_Experiment_on_Python_vs_C_for_an_Introductory_Programming_Course_Students%27_Outcomes/links/5c239be4299bf12be39c13d1/A-Controlled-Experiment-on-Python-vs-C-for-an-Introductory-Programming-Course-Students-Outcomes.pdf" rel="nofollow noreferrer">here</a></p>
  <p>Copying from the abstract:</p>
  <blockquote>
  <p>We performed a controlled experiment comparing a C and a Python
  Introductory Programming course. Three faculty members at University
  of Campinas, Brazil, taught the same CS1 course for the same majors in
  two different semesters, one version in Python and one in C, with a
  total of 391 students involved in the experiment. We measured the
  dropout rate, the failure rate, the grades on the two exams, the
  proportion of completed lab assignments, and the number of submissions
  per completed assignment.
  ...</p>
  </blockquote>
  <p>We observed no difference in the dropout rate, and the difference in the failure rate was in favor of Python but not significant. All others were significant in favor of using Python.</p>
  <p>We did not measure <em>why</em> Python is better, but one can list some reasonable possibilities:</p>
  <ul>
  <li>simpler syntax</li>
  <li>no need for type declaration (which may be a problem later in the student's carreer)</li>
  <li>Python lists as a container type with a simpler semantics and syntax than C arrays (including bound checks, syntactic representation, extensibility)</li>
  <li>lack of call by reference</li>
  <li>lack of pointers</li>
  <li>interactive environment</li>
  </ul>
  <p>I have another research (still unpublished) that Python as a first language does not negatively impact student's outcomes in a C based CS2 (data structures) course.</p>
  <p>So Python is better than C for a CS1 course and has no nagative effect in a CS2 course. How does it impact the rest of the student's programming/CS career, we do not know.</p>
  <p>I also think that the third programming language in a student's learning experience should be a functional programming. Unfortunately not only I do not have experiments regarding that, but in my department I can only teach a functional programming as their <em>fourth</em> language (after Python, C and Java) Not that there is a big loss of being the fourth language instead of the third, but I fear that after a semester of Java and OO development we lost some of those young minds - some of them will never see programming as fun again!! :-)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-18T01:26:07.803Z
Answers.LastActivityDate: 2022-05-18T01:26:07.803Z
Answers.UserDisplayName: Jacques Wainer
Answers.Body: <p>I don't believe that there is any real research on the question, so what you will get here is essentially philosophy and guesswork, buttressed by informal observations.</p>
  <p>I know that there are others in this site who feel strongly in the affirmative, and I will let them argue their own points of view.</p>
  <p>For myself, I suspect that it doesn't matter <em>much</em>.  At the end of the day, we must learn about (and integrate) so very many abstractions, so very many mechanisms, and so many paradigms of thinking before we are professionally competent.  Essentially all of our current professionals began in one of four ways: with imperative programming, with procedural programming, with object oriented programming, or with functional programming.</p>
  <p>All of them proceeded and became professionals.</p>
  <p>Within our own four-year program, we have experimented with objects first, procedural first, and imperative first.  (We teach FP, but we have not tried it at the outset of the program.)  I have not noticed <em>any</em> discernable difference in the quality of our seniors, other than the general rise in quality you'd expect from a faculty that is becoming more experienced and constantly making changes and tweaks together.</p>
  <p>That said, we have over time gravitated towards objects-<em>early</em>, typically in about month 4 of study.  What we found was that, in general, libraries are high-abstraction, so when we ordered things from higher-abstraction to lower-abstraction (such as Java ArrayLists before arrays), it enables kids to work on fun personal projects a little earlier, and that that can be highly rewarding.</p>
  <p>Even if we haven't found giant qualitative differences in the results of students several years in, that in itself is a worthwhile reward.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-15T13:18:35.220Z
Answers.Text: I think objects early suits some students and objects late suit others, some students are happy with programming as an abstract activity, whereas some are more practically minded.  The average performance probably doesn't change, it is just a different sub-population of students that is advantaged/disadvantaged.  I prefer objects late(ish) because objects early can be a hurdle that some students can't manage, so it seems to reduce the number of students that don't learn to program adequately.
Answers.UserDisplayName: Dikran Marsupial
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-15T19:04:55.193Z
Answers.Text: @DikranMarsupial, I'm pretty sure that what you describe is a function of teaching, not student preference or ability. Teachers often have clear views (even prejudices) on object early v late.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-15T20:15:24.163Z
Answers.Text: @Buffy, I think it does extend to students, at least it did when I was one.  Objects first would have been a stumbling block for me - it only really clicked when I found out about v-tables and knew how it all worked (and I had the advantage of having written programs where it would have been useful).  I find abstraction difficult if I don't understand what is being abstracted (and still do).  Not everybody is like me though (thankfully).   I try and take an approach that works either way, hence "late-ish" rather than "late".
Answers.UserDisplayName: Dikran Marsupial
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-14T21:42:09.763Z
Answers.LastActivityDate: 2022-05-14T21:42:09.763Z
Answers.UserDisplayName: Ben I.
Answers.Body: <p>Logically the answer to your question is &quot;yes it matters&quot;. Teaching machine code as a first language is probably not a great idea. But what are the considerations on why it matters?</p>
  <ul>
  <li><p>Feedback and the ability to create small working projects quickly. Being able to create working (and even graphical) examples is incredibly motivating and helpful. JavaScript would be a good example.</p>
  </li>
  <li><p>Similarity to widely used imperative languages. It will give the student a clearer idea and perspective on what programming is about, which is definitely within the purview of education. Sure, they'll figure it out through time and experience, but why not help them? Lisp might be a bad choice here.</p>
  </li>
  <li><p>Simplicity and elegance of the language. Beginners should be focusing their time on learning fundamentals, not in figuring out esoteric shell quoting rules.</p>
  </li>
  <li><p>Well established and supported language. Don't use the newest shiniest language for teaching (or anything else). Having access to resources, debuggers, forums, libraries, source code examples, etc is vital for beginners and old people alike.</p>
  </li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-26T00:44:36.047Z
Answers.LastActivityDate: 2022-05-26T00:57:37.900Z
Answers.LastEditDate: 2022-05-26T00:57:37.900Z
Answers.UserDisplayName: Zinklestoff
Answers.Body: <p>When teaching more or less <em>anything</em> it is best if students are able to understand what they are doing as fully as possible.  &quot;Doing without understanding&quot; is a particularly bad approach to programming and unfortunately is very common these days because the amount of on-line tutorial material and overly-helpful (from a learning perspective) tools that make it easy to do typical pedagogical/andralogical exercises without any  real fundamental understanding of what is actually going on.  The choice of programming language can encourage or discourage this.  C++ is (these days) a particularly bad choice of first programming language as the students will be using a lot of advanced techniques whenever they use the libraries (e.g. std::string is a template) and the error messages they get from the compiler will only be understandable if you know those techniques.  Understanding compiler messages is a <em>very</em> important skill to learn.  Similarly, IDEs encourage you to use things like move semantics (static analyser) and the students will often put them in without knowing what they are doing.  Much as I love C++, Java is a better choice of programming language.</p>
  <p>So if you have a choice, choose a language with the features you need, and which can be explained in a progressive way, always building on things that the student is able to understand well at the time when they first introduced.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-15T13:10:37.940Z
Answers.LastActivityDate: 2022-05-15T13:10:37.940Z
Answers.UserDisplayName: Dikran Marsupial
Body: <p>There is a school of thought that it couldn't matter less which programming language is chosen as one's first programming language. The official position of a well known internet community dedicated to programming is that:</p>
  <ul>
  <li>No programming language is designed to be beginner friendly.</li>
  <li>One will not use their first language to develop things worthy to be published, instead one will only use it to learn basic concepts, therefore arguments such as &quot;<em>to do X you may use Y, but A is instead used to do B</em>&quot; only provide cognitive overload for beginners.</li>
  <li>There is no reason to believe that the choice of the first programming language impacts the effects of learning in any way, so the whole discussion is groundless. (Mods say they will only consider differing opinions on this point if scientific papers are brought to support them)</li>
  </ul>
  <p>Therefore, the said online community bans asking questions like &quot;<em>Which programming language should I pick to learn how to program?</em>&quot; and if such a question is asked then it bans giving any answer other than &quot;<em>It does not matter; pick absolutely any, flip a coin if you like, and stick to this choice</em>&quot;.</p>
  <p>Intuitively I find this position surprising? I would say that:</p>
  <ul>
  <li>Some languages have significantly more gotchas than others. C or C++, in particular, have numerous unobvious rules which, if violated, result in UB. It can easily happen that a program starts misbehaving after a seemingly innocous modification in code is made because of hard to spot UB introduced somewhere else. This seems to be a horrible and a very frustrating experience for beginners.</li>
  <li>A person interested in doing a particular thing might want to be able to scratch their first, even very rudimentary programs in this field. For example, contrary to what is claimed above, a person interested in doing gamedev might be far more interested to scratch their first simplistic games in Unity3D than learn lots of stuff that is too abstract and too unintersting for them because due to the lack of domain knowledge they chose ASM as their first language (since they were not told which lang is good for gamedev, but instead they were told to pick any random language).</li>
  </ul>
  <p>Is there any reason to believe that the choice of one's first programming language matters at all?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-15T19:34:29.203Z
Comments.Text: Re, "...no programming language is designed to be beginner friendly." Who said that? What did they mean? There are a number of programming languages that were created specifically to fill a perceived need for a "beginner friendly" language.
Comments.UserDisplayName: Solomon Slow
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-15T20:59:25.270Z
Comments.Text: @SolomonSlow indeed - BASIC apparently stands for Beginners' All-purpose Symbolic Instruction Code
Comments.UserDisplayName: Dikran Marsupial
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-16T18:52:32.817Z
Comments.Text: _'Therefore, the said online community bans asking questions like "Which programming language should I pick to learn how to program?" and if such a question is asked then it bans...'_ If you're referring to Stack Overflow, the reason the question is off-topic and "banned" (closed) is because it's opinion-based. _"It does not matter; pick absolutely any, flip a coin if you like, and stick to this choice"_ isn't a community/moderator/official consensus at all, just someone's opinion. [Gorilla vs Shark](https://stackoverflow.blog/2011/08/16/gorilla-vs-shark/) is worth a read.
Comments.UserDisplayName: ggorlen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-16T18:57:59.430Z
Comments.Text: @ggorlen I'm not refering to StackOverflow.
Comments.UserDisplayName: gaazkam
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-16T19:02:53.617Z
Comments.Text: Would you mind sharing the site you're referring to, then? I'm surprised that a "well known internet community dedicated to programming" would have official positions that are false, like "No programming language is designed to be beginner friendly". (Folks tend to misconstrue Stack Overflow moderator responses to question closures as "official positions").
Comments.UserDisplayName: ggorlen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-16T19:13:17.360Z
Comments.Text: @ggorlen The exact quote is: "*Languages are **not** based around being good at being a first language.*". Link: https://discord.com/channels/244230771232079873/607627702869950484/610063687562166273 (*sigh*, and I wanted to avoid would could risk badmouthing a concrete community by unintentionally misrepresenting their views...)
Comments.UserDisplayName: gaazkam
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-16T19:16:40.747Z
Comments.Text: Thanks. I can't really access the link and I don't understand the quote though. If you take exact quotes and provide context, then it's not badmouthing or misrepresenting; it's just citing your reference. Paraphrasing, failing to provide context and direct evidence seems like a great way to unintentionally misrepresent things, though.
Comments.UserDisplayName: ggorlen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-16T19:23:07.800Z
Comments.Text: @ggorlen But I can't provide exact quotes at length. If I would, then, to my understanding, I would run afoul of copyright laws. IANAL, but IIUC I *must* paraphrase. And if I do paraphrase then I tend to avoid providing the source, because I fear that the people I quote may get angry at me either for unintentionally misrepresenting what they said or bringing their words to public attention at all, even if not misrepresented... And this did happen in practice to me sometimes. Perhaps this behavioral pattern of mine is incorrect.
Comments.UserDisplayName: gaazkam
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-17T03:19:44.500Z
Comments.Text: Well, I'd think the community in question is perhaps achieving the right answer illogically - to wit: if someone wants to learn to program, the best thing to do is for them to find a thing they want to program and a language suitable for that, and then go with that. This doesn't mean that some languages aren't better/worse for a beginner, but simply that motivation is a far more powerful thing than language-ease, for the most part (exceptions: maybe don't start with brainf*ck). (Anyway, the answer's Python.)
Comments.UserDisplayName: auden
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-19T17:01:08.433Z
Comments.Text: Side note: you probably want to clarify if you consider LISP/Haskell/F# as "languages" - all posts so far are about non-functional languages and it probably means "is functional of procedural languages better as first one" should be separate question.
Comments.UserDisplayName: Alexei Levenkov
Tags: <language-choice>
Title: Is the choice of the first programming language relevant?
ThreadText: # Is the choice of the first programming language relevant?
  
  (Asked by: username_0 on 2022-05-14)
  
  There is a school of thought that it couldn't matter less which programming language is chosen as one's first programming language. The official position of a well known internet community dedicated to programming is that:
  
  * No programming language is designed to be beginner friendly.
  * One will not use their first language to develop things worthy to be published, instead one will only use it to learn basic concepts, therefore arguments such as "*to do X you may use Y, but A is instead used to do B*" only provide cognitive overload for beginners.
  * There is no reason to believe that the choice of the first programming language impacts the effects of learning in any way, so the whole discussion is groundless. (Mods say they will only consider differing opinions on this point if scientific papers are brought to support them)
  
  Therefore, the said online community bans asking questions like "*Which programming language should I pick to learn how to program?*" and if such a question is asked then it bans giving any answer other than "*It does not matter; pick absolutely any, flip a coin if you like, and stick to this choice*".
  
  Intuitively I find this position surprising? I would say that:
  
  * Some languages have significantly more gotchas than others. C or C++, in particular, have numerous unobvious rules which, if violated, result in UB. It can easily happen that a program starts misbehaving after a seemingly innocous modification in code is made because of hard to spot UB introduced somewhere else. This seems to be a horrible and a very frustrating experience for beginners.
  * A person interested in doing a particular thing might want to be able to scratch their first, even very rudimentary programs in this field. For example, contrary to what is claimed above, a person interested in doing gamedev might be far more interested to scratch their first simplistic games in Unity3D than learn lots of stuff that is too abstract and too unintersting for them because due to the lack of domain knowledge they chose ASM as their first language (since they were not told which lang is good for gamedev, but instead they were told to pick any random language).
  
  Is there any reason to believe that the choice of one's first programming language matters at all?
  
  **Tags:** language-choice
  
  > **Comments:**
  > **username_1**: Re, "...no programming language is designed to be beginner friendly." Who said that? What did they mean? There are a number of programming languages that were created specifically to fill a perceived need for a "beginner friendly" language.  
  > **username_2**: @username_1 indeed - BASIC apparently stands for Beginners' All-purpose Symbolic Instruction Code  
  > **username_3**: _'Therefore, the said online community bans asking questions like "Which programming language should I pick to learn how to program?" and if such a question is asked then it bans...'_ If you're referring to Stack Overflow, the reason the question is off-topic and "banned" (closed) is because it's opinion-based. _"It does not matter; pick absolutely any, flip a coin if you like, and stick to this choice"_ isn't a community/moderator/official consensus at all, just someone's opinion. [Gorilla vs Shark](https://stackoverflow.blog/2011/08/16/gorilla-vs-shark/) is worth a read.  
  > **username_0**: @username_3 I'm not refering to StackOverflow.  
  > **username_3**: Would you mind sharing the site you're referring to, then? I'm surprised that a "well known internet community dedicated to programming" would have official positions that are false, like "No programming language is designed to be beginner friendly". (Folks tend to misconstrue Stack Overflow moderator responses to question closures as "official positions").  
  > **username_0**: @username_3 The exact quote is: "*Languages are **not** based around being good at being a first language.*". Link: https://discord.com/channels/244230771232079873/607627702869950484/610063687562166273 (*sigh*, and I wanted to avoid would could risk badmouthing a concrete community by unintentionally misrepresenting their views...)  
  > **username_3**: Thanks. I can't really access the link and I don't understand the quote though. If you take exact quotes and provide context, then it's not badmouthing or misrepresenting; it's just citing your reference. Paraphrasing, failing to provide context and direct evidence seems like a great way to unintentionally misrepresent things, though.  
  > **username_0**: @username_3 But I can't provide exact quotes at length. If I would, then, to my understanding, I would run afoul of copyright laws. IANAL, but IIUC I *must* paraphrase. And if I do paraphrase then I tend to avoid providing the source, because I fear that the people I quote may get angry at me either for unintentionally misrepresenting what they said or bringing their words to public attention at all, even if not misrepresented... And this did happen in practice to me sometimes. Perhaps this behavioral pattern of mine is incorrect.  
  > **username_4**: Well, I'd think the community in question is perhaps achieving the right answer illogically - to wit: if someone wants to learn to program, the best thing to do is for them to find a thing they want to program and a language suitable for that, and then go with that. This doesn't mean that some languages aren't better/worse for a beginner, but simply that motivation is a far more powerful thing than language-ease, for the most part (exceptions: maybe don't start with brainf*ck). (Anyway, the answer's Python.)  
  > **username_5**: Side note: you probably want to clarify if you consider LISP/Haskell/F# as "languages" - all posts so far are about non-functional languages and it probably means "is functional of procedural languages better as first one" should be separate question.  
  
  ---
  
  ## 6 answers
  
  ### Answer by username_11 on 2022-05-14. Score: 4
  
  I don't believe that there is any real research on the question, so what you will get here is essentially philosophy and guesswork, buttressed by informal observations.
  
  I know that there are others in this site who feel strongly in the affirmative, and I will let them argue their own points of view.
  
  For myself, I suspect that it doesn't matter *much*. At the end of the day, we must learn about (and integrate) so very many abstractions, so very many mechanisms, and so many paradigms of thinking before we are professionally competent. Essentially all of our current professionals began in one of four ways: with imperative programming, with procedural programming, with object oriented programming, or with functional programming.
  
  All of them proceeded and became professionals.
  
  Within our own four-year program, we have experimented with objects first, procedural first, and imperative first. (We teach FP, but we have not tried it at the outset of the program.) I have not noticed *any* discernable difference in the quality of our seniors, other than the general rise in quality you'd expect from a faculty that is becoming more experienced and constantly making changes and tweaks together.
  
  That said, we have over time gravitated towards objects-*early*, typically in about month 4 of study. What we found was that, in general, libraries are high-abstraction, so when we ordered things from higher-abstraction to lower-abstraction (such as Java ArrayLists before arrays), it enables kids to work on fun personal projects a little earlier, and that that can be highly rewarding.
  
  Even if we haven't found giant qualitative differences in the results of students several years in, that in itself is a worthwhile reward.
  
  > **Comments:**
  > **username_2**: I think objects early suits some students and objects late suit others, some students are happy with programming as an abstract activity, whereas some are more practically minded.  The average performance probably doesn't change, it is just a different sub-population of students that is advantaged/disadvantaged.  I prefer objects late(ish) because objects early can be a hurdle that some students can't manage, so it seems to reduce the number of students that don't learn to program adequately.  
  > **username_7**: @username_2, I'm pretty sure that what you describe is a function of teaching, not student preference or ability. Teachers often have clear views (even prejudices) on object early v late.  
  > **username_2**: @username_7, I think it does extend to students, at least it did when I was one.  Objects first would have been a stumbling block for me - it only really clicked when I found out about v-tables and knew how it all worked (and I had the advantage of having written programs where it would have been useful).  I find abstraction difficult if I don't understand what is being abstracted (and still do).  Not everybody is like me though (thankfully).   I try and take an approach that works either way, hence "late-ish" rather than "late".  
  
  ---
  
  ### Answer by username_9 on 2022-05-16. Score: 3
  
  The choice of starting language is relevant in its ability to keep a students interest. In the early days of the micro computer BASIC developed itself as the ultimate learning language. It was ubiquitous, part of all of the early micro computers. Popular dialects such as MS BASIC, Apple BASIC, Commodore BASIC all were easy to start with providing quick and impressive feedback almost immediately. Once you got rolling you could build nearly anything with BASIC that the computer was capable of. I doubt I would have become a professional programmer if not for BASIC. You could get your start easily on your own, and without switching languages accomplish something truly impressive.
  
  On the flip side BASIC was reviled by most of industry and academia because of the "bad habits" it taught. If you want to be simultaneously impressed and horrified pick up a back issue of ["Creative Computing"](https://archive.org/details/creativecomputing) or the book "Games in BASIC" by David Ahl.
  
  Most modern languages are both a hit and a miss when it comes to learning how to program.
  
  Block languages will get you started, but are rarely flexible enough to do anything real. You can do anything in C/C++ but pointer notation is incomprehensible to most newbies. Java eliminates the need for memory management, but the cross platformness of it make doing anything impressive problematic. Javascript is straight forward and ubiquitous, but is overly focused on the web. Python comes close, but its syntax encourages incomprehensible one liners that can scare even practiced coders away.
  
  The language you start off with matters... but it won't really make a difference. All programming languages are both perfect and horrible.
  
  > **Comments:**
  > **username_2**: Thanks for the link to Creative Computing, I magazine I didn't know.  The first article in the first edition there was a review of my first ever computer (Jupiter Ace).  Some of Ahl's games (e.g. Hamurabi) make nice exercises or mini-projects for introductory programming courses.  Unfortunately "someone" is making a website of translations of the programs into more modern languages, which rather detracts from that (https://github.com/coding-horror/basic-computer-games).  
  
  ---
  
  ### Answer by username_10 on 2022-05-18. Score: 3
  
  My 2cents on this topic. I certainly do not know if the first programming language has life long impacts (as an old guy whose first programming language was COBOL I sincerely hope there is none :-)
  
  But there are measurable effects of the programming language in relation to students outcomes in a CS1 course. Let me unashamedly plug in my own research <https://dl.acm.org/doi/abs/10.1145/3152894> (this is behind pay wall - there is a non pay-walled version [here](https://www.researchgate.net/profile/username_10/publication/327005495_A_Controlled_Experiment_on_Python_vs_C_for_an_Introductory_Programming_Course_Students%27_Outcomes/links/5c239be4299bf12be39c13d1/A-Controlled-Experiment-on-Python-vs-C-for-an-Introductory-Programming-Course-Students-Outcomes.pdf)
  
  Copying from the abstract:
  
  > We performed a controlled experiment comparing a C and a Python
  > Introductory Programming course. Three faculty members at University
  > of Campinas, Brazil, taught the same CS1 course for the same majors in
  > two different semesters, one version in Python and one in C, with a
  > total of 391 students involved in the experiment. We measured the
  > dropout rate, the failure rate, the grades on the two exams, the
  > proportion of completed lab assignments, and the number of submissions
  > per completed assignment.
  > ...
  
  We observed no difference in the dropout rate, and the difference in the failure rate was in favor of Python but not significant. All others were significant in favor of using Python.
  
  We did not measure *why* Python is better, but one can list some reasonable possibilities:
  
  * simpler syntax
  * no need for type declaration (which may be a problem later in the student's carreer)
  * Python lists as a container type with a simpler semantics and syntax than C arrays (including bound checks, syntactic representation, extensibility)
  * lack of call by reference
  * lack of pointers
  * interactive environment
  
  I have another research (still unpublished) that Python as a first language does not negatively impact student's outcomes in a C based CS2 (data structures) course.
  
  So Python is better than C for a CS1 course and has no nagative effect in a CS2 course. How does it impact the rest of the student's programming/CS career, we do not know.
  
  I also think that the third programming language in a student's learning experience should be a functional programming. Unfortunately not only I do not have experiments regarding that, but in my department I can only teach a functional programming as their *fourth* language (after Python, C and Java) Not that there is a big loss of being the fourth language instead of the third, but I fear that after a semester of Java and OO development we lost some of those young minds - some of them will never see programming as fun again!! :-)
  
  
  ---
  
  ### Answer by username_12 on 2022-05-26. Score: 2
  
  Logically the answer to your question is "yes it matters". Teaching machine code as a first language is probably not a great idea. But what are the considerations on why it matters?
  
  * Feedback and the ability to create small working projects quickly. Being able to create working (and even graphical) examples is incredibly motivating and helpful. JavaScript would be a good example.
  * Similarity to widely used imperative languages. It will give the student a clearer idea and perspective on what programming is about, which is definitely within the purview of education. Sure, they'll figure it out through time and experience, but why not help them? Lisp might be a bad choice here.
  * Simplicity and elegance of the language. Beginners should be focusing their time on learning fundamentals, not in figuring out esoteric shell quoting rules.
  * Well established and supported language. Don't use the newest shiniest language for teaching (or anything else). Having access to resources, debuggers, forums, libraries, source code examples, etc is vital for beginners and old people alike.
  
  
  ---
  
  ### Answer by username_2 on 2022-05-15. Score: 2
  
  When teaching more or less *anything* it is best if students are able to understand what they are doing as fully as possible. "Doing without understanding" is a particularly bad approach to programming and unfortunately is very common these days because the amount of on-line tutorial material and overly-helpful (from a learning perspective) tools that make it easy to do typical pedagogical/andralogical exercises without any real fundamental understanding of what is actually going on. The choice of programming language can encourage or discourage this. C++ is (these days) a particularly bad choice of first programming language as the students will be using a lot of advanced techniques whenever they use the libraries (e.g. std::string is a template) and the error messages they get from the compiler will only be understandable if you know those techniques. Understanding compiler messages is a *very* important skill to learn. Similarly, IDEs encourage you to use things like move semantics (static analyser) and the students will often put them in without knowing what they are doing. Much as I love C++, Java is a better choice of programming language.
  
  So if you have a choice, choose a language with the features you need, and which can be explained in a progressive way, always building on things that the student is able to understand well at the time when they first introduced.
  
  
  ---
  
  ### Answer by username_6 on 2022-05-15. Score: 1
  
  Of course it is highly relevant. Optimally, you would prefer to start teaching with a more high-level language like Python, not low level one as C or assembler, nor outright bugged one as C++. Otherwise, you are going to have to flood the beginners' minds with insane amounts of details that are completely irrelevant from a beginner's point of view before they are capable of writing even a simple "Hello World"; the students would get the impression that programming is about memorizing gibberish, magical incantations that most often look like badly misspelled words, like `main(int argc, char **argv)`, `scanf("%d",&x)` or `.globl _start:` instead of being about logical algorithmic thinking. Best strategy for satisfying teaching/learning experience is to teach students the most powerful concepts in the context of their current knowledge levels -- otherwise, it is more reminiscent of regurgitating loose pieces of information in the students' general direction, rather than teaching them to do anything useful.
  
  Let's say that all they know is printing and reading from the terminal, and you want to teach them how have a program ask for user's age and name, and then print a personalized greeting message using that age and name. It is much less productive and pleasant if beforehand they are forced to learn a bunch of completely irrelevant details for the time being, like in case of C: the concept of a call stack, the difference between how a computer treats numbers versus lines of text, the fact how the numeric variable is storing the number like one would expect but the variable representing line of text actually only stores an address of a remote location where the line of text begins, difference between passing by value versus passing by reference, the fact that arrays are similar to pointers but also not really that similar -- which is all required before one can fully comprehend why the cryptic gibberish incantation for reading a line of text with "scanf" does not need an ampersand added to the name of variable representing a line of text, while the ampersand is needed in case of reading a number. In such case, students are forced to learn a whole lot of details that won't be actually useful for them until much later in their education, and that is discouraging. Good education is about filtering the information you are passing to students to distill the most relevant pieces, not about regurgitating all the random and unrelated chunks at them.
  
  > **Comments:**
  > **username_7**: (Not your downvoter, BTW). But when you say "Optimally...", you are expressing a personal choice (which I happen to agree with), but not a law of nature. There are lots of folks who want to teach a purely bottom up curriculum, following the historical development too a large extent.  
  > **username_8**: As @username_7 said, "optimally" is highly opinionated and unlike username_7 I would doubt that very much. "outright bugged one as C++", ah what? If you are using `.global_start:` as an example why you shouldn't use C++ as a beginner language you are doing something VERY wrong. It takes about 10 minutes time to turn C++ into a beginner friendly language. I have used cin/cout perfectly fine without any callstack knowledge and I'd argue the difference between numbers and strings is one of the five most fundamental things in CS. Arguably Pythons "I'll do whatever the f*%& you want" approach can produce  
  > **username_8**: fast result but can be detrimental to actual understanding (as I said arguably, both have pros and cons but you make it seem like anyone who learns the difference between int and char before their fourth year, will be scarred for life). Overall your answer gives off the sentiment of either "CS students must, under no circumstances, be challenged at all" or just an outright rant about a worst possible teaching practice (while twisting arguments in a weired way).  
  > **username_6**: @username_8 C++ is indeed heavily bugged and there are a lot of different examples. For instance, would you guess what does `cout<<ptr` do if `p` is a pointer to a volatile variable? [Legit and totally reasonable behavior -- it's not bug, it's a feature!](https://stackoverflow.com/q/2501737) Another example is [buggy std::vector behavior](https://stackoverflow.com/questions/14603395). `.globl _start:` is a line from assembly language that I listed as one of three examples, it is not C++. _"CS students must, under no circumstances, be challenged at all"_ would suggest that Python is {continues}  
  > **username_6**: @username_8 never challenging, which is puzzling to say at least.  
  
  ---
  
  