It's better, in my opinion, to start with a low-level language, learn how computers work

I think it's adequate to have a chunked view of how computers work. I don't think it's necessary to know all the details of how each operation is carried out. Taken to extremes, this is really a tautology: Do you really want all beginning programmers to study microcode? Transistor gates? The relationship between power, current, voltage, and resistance? The behavior of individual electrons, the nature of metals, and the Bohr model? Quarks and quantum mechanics?

In my more old-gittish moments, I think that C is too high-level to get started with and that everyone should learn to program a simple processor like a Z80 or a 6502 in assembly language.

Assembly language is a far better first language than C. It's simpler. It's better documented. There are fewer really horrible examples out there, less really bad-quality code in assembly language than in C -- and the bad-quality assembly-language code they're less likely to find, because it's less likely to be in production use.

C is a remarkably poor choice because it's just almost high-level enough that the programmer is likely to want to continue using it, rather than learning a more appropriate tool. Far too many potentially great programmers get mired in low-level thinking, forget how to work with layers of abstraction, and never recover from it. At least if you teach 'em line-number BASIC they'll want to move on.

Then there's the other matter: there are too many C programmers already, a great surplus of them, so that many things are written in C that shouldn't be, things like entire applications that have absolutely no need for low-level fiddling and microoptimization, but they're written in C because it's the canonical ubiquitous language. This is a bad thing, as it leads to needless stupid preventable lowlevel bugs (segfaults, buffer overruns, coredumps, and the like). There would be a lot fewer computer crashes if C were only used where it's appropriate, for inherently lowlevel things (like kernels and virtual machines).


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

In reply to Re: OT: Switching Sides by jonadab
in thread OT: Switching Sides by Khansultant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.