[HN Gopher] Teaching D from Scratch: Is it a viable first language?
       ___________________________________________________________________
        
       Teaching D from Scratch: Is it a viable first language?
        
       Author : teleforce
       Score  : 30 points
       Date   : 2021-12-28 08:54 UTC (1 days ago)
        
 (HTM) web link (dlang.org)
 (TXT) w3m dump (dlang.org)
        
       | [deleted]
        
       | andrewzah wrote:
       | To be frank, why would one choose a language with a small
       | community over any of the major languages? Beginners have to
       | learn -how- to program on top of the language's syntax and
       | toolchain itself, so it helps tremendously to be able to search
       | online when they get stuck. And boy do they get stuck a lot, in
       | my experience.
       | 
       | If you pick something like python, any common beginner problem
       | should have questions answered on stackoverflow, blog posts, etc.
       | With a more boutique language that's not the case. Not to mention
       | the ecosystems are much larger so chances are a library already
       | exists to do something instead of making the beginner do it
       | themselves and overloading them. There will be more tutorials, so
       | people can get unstuck. More documentation around the tooling and
       | just documentation in general exists, and so forth.
       | 
       | ---
       | 
       | Of course, you should teach "what you know best", but how hard is
       | it to learn e.g. python (even just for the scope of the course)
       | and just teach that? My favorite languages are Rust and Go, but
       | I'm not going to foist those upon newbies just because I'm more
       | familiar with those than javascript, python, ruby, etc.
       | 
       | The secondary lesson here is that teaching (well) is actually
       | quite difficult. Coming up with a curriculum is hard. Keeping
       | students engaged and unstuck is hard. Knowing how to program
       | doesn't prepare you for any of that.
        
         | WalterBright wrote:
         | 1. D is an easy language to learn. Frankly, one will probably
         | learn better by having to explore a bit here and there rather
         | than having every answer instantly available, no effort
         | required. A big part of effective learning is working to solve
         | a problem yourself.
         | 
         | 2. D supports many styles of programming - imperative, meta,
         | OOP, functional, machine code - so one can quickly learn these
         | many styles without having to learn another language. With D's
         | inline assembler, one can even use D to learn assembler without
         | needing to deal with all the boilerplate of setting up an
         | assembler program.
         | 
         | 3. Interpreted languages, for example, do a good job of hiding
         | what is actually going on. This leaves gaps in a programmer's
         | knowledge.
         | 
         | 4. D has a active and large learn forum. Help is available as
         | needed.
         | 
         | 5. Being a D programmer marks one as innovative and willing to
         | try new things. Many employers consider D experience on the
         | resume as a nice plus.
         | 
         | 6. D includes a C compiler (ImportC) so if you _must_ use a
         | solution in C, it 's easy to access.
        
       | rndm_access wrote:
       | I am a strong proponent of not using anything that forces you to
       | use OOP as "baby's 1st language". Well I see OOP as a heresy in
       | general tho. To me programming is about algorithms and data
       | structures and data flow. Not some strange concept of OOP that
       | does not even have an exact definition and you can see some
       | extremists claiming that literally everything is OOP.
        
         | nick__m wrote:
         | from the article:                 To that end, I've left out a
         | lot of the advanced features (so far), such as:
         | Templates         Type inference         Operator overloading
         | Overloading in general!         __traits
         | Classes/Interfaces/OOP         Pointers/references (mostly)
         | Memory management in general (thank you GC!)
        
         | WalterBright wrote:
         | Although D supports the OOP paradigm, it does not require it at
         | all. Very little of the D standard library uses OOP, for
         | example.
        
         | 71a54xd wrote:
         | My first true language was learning C in college, I'd
         | definitely do that again. When I switched to CS everything was
         | scheme (lisp) based which I actually preferred to Python and
         | later on was mostly Java based. I still hate Java but it's
         | gotten me through interview / interview screens so I'm okay
         | with it now.
         | 
         | For me, first language should be strict and not too loose with
         | the rules (so not python). Once you've got the rules down and
         | understand why they are there / why certain languages use those
         | constructs - build from there.
         | 
         | But take all of this with a grain of salt because I was a very
         | distracted student more interested in working for startups
         | during college than graduating with a nice GPA ;)
        
         | bell-cot wrote:
         | Ah...isn't D close enough to being a superset of C that it's
         | perfectly usable as a non-OOP language, in educational
         | contexts?
        
           | alphaglosined wrote:
           | Unless you are touching something like threads or exceptions,
           | you probably won't use classes unless it expresses your data
           | best.
           | 
           | So yes, perfectly usable without OOP or classes.
        
         | bigodbiel wrote:
         | If you want to go maverick, why not LISP?
        
       ___________________________________________________________________
       (page generated 2021-12-29 23:00 UTC)