digitalmars.D.announce - Is D programming friendly for beginners?
- Fidele (2/2) Mar 04 I want to start learning D programming language it looks
- Sergey (8/10) Mar 04 Please use "Learn" Group of the forum, this part of the forum for
- evilrat (32/34) Mar 04 Answering thread question:
- thinkunix (22/23) Mar 05 Get familiar with https://dlang.org/ web site, you'll use it a lot.
- Doigt (4/6) Mar 11 Depends what you mean by "beginner". If you've never programmed
- Bastiaan Veelo (4/10) Mar 12 Why definitely not?
- Mike Shah (4/15) Mar 12 I really think D would be a wonderful first language. 🙂 Fast
- matheus. (12/16) Mar 12 If you say that D would be a good language to learn in lieu
- Mike Shah (18/34) Mar 12 I agree (and I've made my case from my DConf talk with some data)
- Lance Bachmeier (12/16) Mar 12 As someone that's been teaching beginners to program at a
- M.M. (8/24) Mar 12 I was always wondering about this debate on a suitable "first"
- bachmeier (7/14) Mar 13 I'm not a CS person so I'll have to defer to others (their needs
- H. S. Teoh (14/33) Mar 12 I don't know how CS programs are carried out these days, but back when I
- Andrea Fontana (3/15) Mar 12 I agree.
- Meta (9/25) Mar 12 I think it really depends on the person. My first language was
- H. S. Teoh (10/17) Mar 12 People who are more than casually interested in computers should
- Mike Shah (18/48) Mar 12 I've been at institutions where C++ is the first language and for
- M.M. (10/41) Mar 13 I understand that outside of CS, something like Python is a fine
- Martin Tschierschke (3/5) Mar 13 The free digital book from Ali, is written to fit your need:
- Quirin Schroll (48/49) Jul 23 Only if you use `@safe` on your `main` function and essentially
- Matheus (12/12) Jul 24 I work at home, but once I was at the office and I saw someone
I want to start learning D programming language it looks interesting
Mar 04
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote:I want to start learning D programming language it looks interestingPlease use "Learn" Group of the forum, this part of the forum for Announcements. Here are some useful links: * Tour - https://tour.dlang.org * Online Book - http://ddili.org/ders/d.en/index.html * Other materials in Wiki - https://wiki.dlang.org/The_D_Programming_Language
Mar 04
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote:I want to start learning D programming language it looks interestingAnswering thread question: It can be complicated, D has a lot of features and mastering it will take quite a lot of time. Since D is statically typed compiled system programming language it is still will be harder to grasp than say Python. The core language is pretty neat and shouldn't cause much trouble, by core here I mean basic templates, basic mixins, basic classes and operator overloading, version conditioning and such. Ranges and the standard library approach to "Design-by-Introspection" will definitely require some time to get used to, so expect to dive into std sources a lot for real world examples. Advanced templates is still not as hard as C++ though, and there is no some of the more quirks that C++ has. Few things to avoid until you absolutely know what you are doing is nogc and betterC. There is also a "system" part in it that ultimately will require you to understand what is actually a executable file and what is a linker, knowing how to use debuggers, etc... Finally, D is flexible enough to delay touching some of those features until you are ready, and unlike practically any other language it doesn't forces any philosophy or zen or whatever ideology on you. Before you started though - note that D is not considered "enterprisey" enough language so don't expect your favorite JetBrains IDE or other fancy tooling, the debuggers are just minimally working, and generally any other ecosystem tools (if any) too. This means you have to understand more about how these things works and this may add extra complexity and make you think the whole language is not there yet.
Mar 04
Fidele via Digitalmars-d-announce wrote:I want to start learning D programming language it looks interestingGet familiar with https://dlang.org/ web site, you'll use it a lot. Do the Tour, https://tour.dlang.org/ Books, full list here: https://wiki.dlang.org/Books I would recommend starting with these. I found them easy to read and they just make sense. * Learning D by Mike Parker and * Programming in D by Ali Çehreli I also highly recommend Mike Shah's video series available on youtube and on his web site: https://courses.mshah.io/courses/d-language-dlang-programming The advantages of Mike Shah's site are: * no youtube distractions * you can track your progress * it's FREE! You can get started with just a text editor and one of the D compilers. Lastly, as others mentioned, get on the D-Learn mailing list, or use the forum https://forum.dlang.org/ instead of D-announce. Lurk for a while. Read and try some of the code snippets you see go by. It will help you understand the language. Welcome to D! scot
Mar 05
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote:I want to start learning D programming language it looks interestingDepends what you mean by "beginner". If you've never programmed before and D is your first language, then the answer is a definite no.
Mar 11
On Monday, 11 March 2024 at 12:30:10 UTC, Doigt wrote:On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote:Why definitely not? https://youtu.be/V2YwTIIMEeU?si=j3cQzzN4jsUQrN9C&t=682 -- Bastiaan.I want to start learning D programming language it looks interestingDepends what you mean by "beginner". If you've never programmed before and D is your first language, then the answer is a definite no.
Mar 12
On Tuesday, 12 March 2024 at 14:03:30 UTC, Bastiaan Veelo wrote:On Monday, 11 March 2024 at 12:30:10 UTC, Doigt wrote:I really think D would be a wonderful first language. 🙂 Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro course.On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote:Why definitely not? https://youtu.be/V2YwTIIMEeU?si=j3cQzzN4jsUQrN9C&t=682 -- Bastiaan.I want to start learning D programming language it looks interestingDepends what you mean by "beginner". If you've never programmed before and D is your first language, then the answer is a definite no.
Mar 12
On Tuesday, 12 March 2024 at 14:52:32 UTC, Mike Shah wrote:... I really think D would be a wonderful first language. 🙂 Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro course.If you say that D would be a good language to learn in lieu C++/Rust I'd agree, but as a First Language neither one would be my choice. Most here already program and know things, but as a first language forget, at least where and when I did college (Already knowing how to program), most people were lost with all the concepts of C++ for example. Bitwise shifts like << >> and the same operators being used in cin/cout may be OK for most people already in programming and using shell, but for those learning was a hell. Matheus.
Mar 12
On Tuesday, 12 March 2024 at 16:20:29 UTC, matheus. wrote:On Tuesday, 12 March 2024 at 14:52:32 UTC, Mike Shah wrote:I agree (and I've made my case from my DConf talk with some data) D is much more productive than C++ for students (especially in the scope of a quarter or semester long course). I probably would recommend in the general case that someone who wants to try programming to start with Python or JavaScript -- purely because the start up cost is smaller, and the vast amount of packages let beginners do something interesting quickly. That said, in a university curriculum (where students have multiple semesters), D could prove nice as an intro language as it has the ability to scale up in difficulty over time. I think D is friendly enough that it would not immediately turn away beginners from computer science programs (But ultimately Python probably wins for now in this category). As a note, the 'which language is best for CS 1' debate has long been debated -- but at least in a school setting, I've found the quality/enthusiasm/encouragement of the teacher to be the most important aspect regardless of language choice.... I really think D would be a wonderful first language. 🙂 Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro course.If you say that D would be a good language to learn in lieu C++/Rust I'd agree, but as a First Language neither one would be my choice. Most here already program and know things, but as a first language forget, at least where and when I did college (Already knowing how to program), most people were lost with all the concepts of C++ for example. Bitwise shifts like << >> and the same operators being used in cin/cout may be OK for most people already in programming and using shell, but for those learning was a hell. Matheus.
Mar 12
On Tuesday, 12 March 2024 at 17:03:42 UTC, Mike Shah wrote:As a note, the 'which language is best for CS 1' debate has long been debated -- but at least in a school setting, I've found the quality/enthusiasm/encouragement of the teacher to be the most important aspect regardless of language choice.As someone that's been teaching beginners to program at a university for a long time (but not in a CS department) I've come to see the choice of language as largely unimportant. You have to decide what you want to teach them and then eliminate the languages that aren't suitable. D is one of many languages that would work with the right content. Other languages, like C++, add unnecessary overhead and thus should not be used. It's often said "X is a complicated language" but that's the wrong way to look at it. You're teaching a set of programming concepts, not a language. The question is how well a particular language works for learning those concepts.
Mar 12
On Tuesday, 12 March 2024 at 18:03:43 UTC, Lance Bachmeier wrote:On Tuesday, 12 March 2024 at 17:03:42 UTC, Mike Shah wrote:I was always wondering about this debate on a suitable "first" programming language in a CS curriculum. I largely observe one dividing point: to start with a strongly-typed language or not. (After that, it probably does not matter so much which language is chosen; alas, it should be available on Windows, Linux, and Mac OS). Do you observe similar sentiment in the discussions in the university settings?As a note, the 'which language is best for CS 1' debate has long been debated -- but at least in a school setting, I've found the quality/enthusiasm/encouragement of the teacher to be the most important aspect regardless of language choice.As someone that's been teaching beginners to program at a university for a long time (but not in a CS department) I've come to see the choice of language as largely unimportant. You have to decide what you want to teach them and then eliminate the languages that aren't suitable. D is one of many languages that would work with the right content. Other languages, like C++, add unnecessary overhead and thus should not be used. It's often said "X is a complicated language" but that's the wrong way to look at it. You're teaching a set of programming concepts, not a language. The question is how well a particular language works for learning those concepts.
Mar 12
On Tuesday, 12 March 2024 at 19:07:25 UTC, M.M. wrote:I was always wondering about this debate on a suitable "first" programming language in a CS curriculum. I largely observe one dividing point: to start with a strongly-typed language or not. (After that, it probably does not matter so much which language is chosen; alas, it should be available on Windows, Linux, and Mac OS). Do you observe similar sentiment in the discussions in the university settings?I'm not a CS person so I'll have to defer to others (their needs are very different). My grad students are doing more complicated programming for data analysis and simulation. I focus on recursion and using a functional programming approach, because that simplifies things so much for these types of problems. All I need is a language that supports that.
Mar 13
On Tue, Mar 12, 2024 at 06:03:43PM +0000, Lance Bachmeier via Digitalmars-d-announce wrote:On Tuesday, 12 March 2024 at 17:03:42 UTC, Mike Shah wrote:I don't know how CS programs are carried out these days, but back when I was in university, the choice of language is largely irrelevant, because the whole point of a programming course isn't to teach you a specific language, but to teach you the *principles* that underlie programming in general. There are really only a small handful of different paradigms that you need to learn; once you learned the principles behind them, they can be applied to any language out there. You wouldn't need anyone to teach you a new language then; you could just learn it yourself by applying these same principles. The rest, as they say, is just details. ;-) T -- The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world. -- AnonymousAs a note, the 'which language is best for CS 1' debate has long been debated -- but at least in a school setting, I've found the quality/enthusiasm/encouragement of the teacher to be the most important aspect regardless of language choice.As someone that's been teaching beginners to program at a university for a long time (but not in a CS department) I've come to see the choice of language as largely unimportant. You have to decide what you want to teach them and then eliminate the languages that aren't suitable. D is one of many languages that would work with the right content. Other languages, like C++, add unnecessary overhead and thus should not be used. It's often said "X is a complicated language" but that's the wrong way to look at it. You're teaching a set of programming concepts, not a language. The question is how well a particular language works for learning those concepts.
Mar 12
On Tuesday, 12 March 2024 at 19:12:03 UTC, H. S. Teoh wrote:I don't know how CS programs are carried out these days, but back when I was in university, the choice of language is largely irrelevant, because the whole point of a programming course isn't to teach you a specific language, but to teach you the *principles* that underlie programming in general. There are really only a small handful of different paradigms that you need to learn; once you learned the principles behind them, they can be applied to any language out there. You wouldn't need anyone to teach you a new language then; you could just learn it yourself by applying these same principles. The rest, as they say, is just details. ;-) TI agree. Andrea
Mar 12
On Tuesday, 12 March 2024 at 16:20:29 UTC, matheus. wrote:On Tuesday, 12 March 2024 at 14:52:32 UTC, Mike Shah wrote:I think it really depends on the person. My first language was C++, which was absolute hell to learn as a complete beginner to programming, but I really wanted to learn a language with low-level capabilities that could also do gamedev. Learning C++ as my first language was incredibly difficult, but it also made the programming parts of my CS degree a breeze - especially courses like machine level programming. Nobody else in the class even understood what a pointer was for the first couple weeks.... I really think D would be a wonderful first language. 🙂 Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro course.If you say that D would be a good language to learn in lieu C++/Rust I'd agree, but as a First Language neither one would be my choice. Most here already program and know things, but as a first language forget, at least where and when I did college (Already knowing how to program), most people were lost with all the concepts of C++ for example. Bitwise shifts like << >> and the same operators being used in cin/cout may be OK for most people already in programming and using shell, but for those learning was a hell. Matheus.
Mar 12
On Tue, Mar 12, 2024 at 08:40:49PM +0000, Meta via Digitalmars-d-announce wrote: [...]I think it really depends on the person. My first language was C++, which was absolute hell to learn as a complete beginner to programming, but I really wanted to learn a language with low-level capabilities that could also do gamedev. Learning C++ as my first language was incredibly difficult, but it also made the programming parts of my CS degree a breeze - especially courses like machine level programming. Nobody else in the class even understood what a pointer was for the first couple weeks.People who are more than casually interested in computers should have at least some idea of what the underlying hardware is like. Otherwise the programs they write will be pretty weird. -- D. Knuth ;-) T -- Just because you can, doesn't mean you should.
Mar 12
On Tuesday, 12 March 2024 at 20:40:49 UTC, Meta wrote:On Tuesday, 12 March 2024 at 16:20:29 UTC, matheus. wrote:I've been at institutions where C++ is the first language and for most folks who were sure they wanted to do programming it was a fine enough language (when taught with care) to teach. In fact, it benefited me (and other instructors) quite a bit when I saw those students later and taught them computer graphics (usually taught in C++ to prepare them for job market). For folks who were not sure if they wanted to study computer science, unfortunately they were scared away as they thought this was the only path for programming (i.e. C++, assembly, etc.). For this reason, a language that is gentler (e.g. Python, JavaScript, or I also suspect a large subset of D) would all have been better choices. More universities these days are offering courses with gentler options (e.g. Programming for non-majors) which usually take this approach to more slowly ramp students up -- which I think is a good thing to have these offerings. And then later on in the program, these students can learn the good stuff (i.e. systems, compilers, graphics, etc. :) )On Tuesday, 12 March 2024 at 14:52:32 UTC, Mike Shah wrote:I think it really depends on the person. My first language was C++, which was absolute hell to learn as a complete beginner to programming, but I really wanted to learn a language with low-level capabilities that could also do gamedev. Learning C++ as my first language was incredibly difficult, but it also made the programming parts of my CS degree a breeze - especially courses like machine level programming. Nobody else in the class even understood what a pointer was for the first couple weeks.... I really think D would be a wonderful first language. 🙂 Fast feedback, no need to manage memory, and easy to use built-in data structures would make for a nice intro course.If you say that D would be a good language to learn in lieu C++/Rust I'd agree, but as a First Language neither one would be my choice. Most here already program and know things, but as a first language forget, at least where and when I did college (Already knowing how to program), most people were lost with all the concepts of C++ for example. Bitwise shifts like << >> and the same operators being used in cin/cout may be OK for most people already in programming and using shell, but for those learning was a hell. Matheus.
Mar 12
On Tuesday, 12 March 2024 at 22:27:11 UTC, Mike Shah wrote:On Tuesday, 12 March 2024 at 20:40:49 UTC, Meta wrote:I understand that outside of CS, something like Python is a fine choice, hiding many low-level details. But within a CS-curriculum, one needs to come beyond basics-of-programming to something like efficient algorithm-design-and-data-structures; isn't a typed language better here? (Like the quote of Knuth says: if you do not understand the hardware behind, your programs will look weird. I have observed this a lot with current data-science students, which use a map/dictionary for everything, largely ignoring the existence of arrays).On Tuesday, 12 March 2024 at 16:20:29 UTC, matheus. wrote:I've been at institutions where C++ is the first language and for most folks who were sure they wanted to do programming it was a fine enough language (when taught with care) to teach. In fact, it benefited me (and other instructors) quite a bit when I saw those students later and taught them computer graphics (usually taught in C++ to prepare them for job market). For folks who were not sure if they wanted to study computer science, unfortunately they were scared away as they thought this was the only path for programming (i.e. C++, assembly, etc.). For this reason, a language that is gentler (e.g. Python, JavaScript, or I also suspect a large subset of D) would all have been better choices. More universities these days are offering courses with gentler options (e.g. Programming for non-majors) which usually take this approach to more slowly ramp students up -- which I think is a good thing to have these offerings. And then later on in the program, these students can learn the good stuff (i.e. systems, compilers, graphics, etc. :) )[...]I think it really depends on the person. My first language was C++, which was absolute hell to learn as a complete beginner to programming, but I really wanted to learn a language with low-level capabilities that could also do gamedev. Learning C++ as my first language was incredibly difficult, but it also made the programming parts of my CS degree a breeze - especially courses like machine level programming. Nobody else in the class even understood what a pointer was for the first couple weeks.
Mar 13
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote:I want to start learning D programming language it looks interestingThe free digital book from Ali, is written to fit your need: https://ddili.org/ders/d.en/index.html
Mar 13
On Monday, 4 March 2024 at 13:37:53 UTC, Fidele wrote:Is D programming friendly for beginners?Only if you use ` safe` on your `main` function and essentially everywhere except templates (those infer ` safe` and you should let them do that). ` system` is an expert tool, unfortunately, it’s the default. Unless you use ` safe`, it is actually easy to accidentally corrupt memory. For short, ` safe` disallows any operation that could introduce undefined behavior, in particular memory corruption. There are so-called preview switches on the compiler. Those enable latest features or bugfixes that are incompatible with the old langue state. If a preview feature is deemed ready for production, it’ll become active by default. IMO, the following preview switches should be enabled: * `-preview=dip1000` This allows more operations in ` safe` code, but error messages can become more cryptic. E.g., pre-DIP1000, taking the address of a local variable was illegal and with DIP1000, it’s allowed under certain circumstances, but when it’s not okay, the error message isn’t simply “you can’t do that”. It will become the default at some point, so it might be worth to learn its semantics from the beginning. * `-preview=dip1008` Allows allocating `Error` objects in ` nogc` code. Makes ` nogc` code more useful. * `-preview=fieldwise` Must have. Fixes auto-generated comparisons for structs. * `-preview=fixAliasThis` Fixes lookup of `alias this` constructs. * `-preview=nosharedaccess` Must have. Fixes `shared`, which can be unsafe otherwise. * `-preview=in` Makes the parameter storage class `in` actually useful. Note: This is dangerous without ` safe`. Under the preview switch, `in` makes strong guarantees, but without ` safe`, it is assumed, but not checked, if the guarantees truly hold. With ` safe`, however, they are checked and it’s fool-proof. * `-preview=inclusiveincontracts` Must have. Fixes function contracts. * `-preview=fixImmutableConv` Must have. Fixes various conversion issues in the type system. Not actively recommended, but not actively harmful either: * `-preview=bitfields` Unclear if it’s going to stay. * `-preview=systemVariables` Primarily relevant if you write ` system` code. First learn the language. (No harm if enabled.) Recommended to stay away from: * `-preview=rvaluerefparam` Don’t use it. It’s never going to be the default and likely will be removed in the future in favor of something else. The reason I’m advocating preview switches is because as a learner, you’re likely not writing production code that’s going to stay, but throwaway code for the purpose of you gaining knowledge of the language.
Jul 23
I work at home, but once I was at the office and I saw someone literally copying a SO answer direct to the project, and many times I saw code there were literally copied as is, I could tell because the way it was written, language etc. One of the cases was a LIB in Oracle to read JSON, it came with all the flaws you would expected, and the limitation of 32767 characters. The other day I saw a video of C++ (I think it was from Jason Tyler or a name like that), showing some code generated by AI, and he said it was very clever. Now I wonder about the future in this area... I mean for some will be a matter of copying from SO or AI. =] Matheus.
Jul 24
On Wednesday, 24 July 2024 at 15:02:04 UTC, Matheus wrote:I work at home, but once I was at the office and I saw someone literally copying a SO answer direct to the project, and many times I saw code there were literally copied as is, I could tell because the way it was written, language etc. One of the cases was a LIB in Oracle to read JSON, it came with all the flaws you would expected, and the limitation of 32767 characters. The other day I saw a video of C++ (I think it was from Jason Tyler or a name like that), showing some code generated by AI, and he said it was very clever. Now I wonder about the future in this area... I mean for some will be a matter of copying from SO or AI. =] Matheus.AI will generate answers and then post them on the internet. Then AI will read the answers it sees on the internet, to reprogram itself. AI will eat itself.
Jul 24
On Wednesday, 24 July 2024 at 15:02:04 UTC, Matheus wrote:I work at home, but once I was at the office and I saw someone literally copying a SO answer direct to the project, and many times I saw code there were literally copied as is, I could tell because the way it was written, language etc. One of the cases was a LIB in Oracle to read JSON, it came with all the flaws you would expected, and the limitation of 32767 characters. The other day I saw a video of C++ (I think it was from Jason Tyler or a name like that), showing some code generated by AI, and he said it was very clever. Now I wonder about the future in this area... I mean for some will be a matter of copying from SO or AI. =] Matheus.I was stubborn about adopting AI is my workflow but I tried recently and I'm a bit productive overall. Once you have a good experience with a language and understanding the domain, AI is a helpful assistant in research and prototyping code that might eventually be refined for production. It important however to know when you the suggestions are wrong, hence they need to gain some experience. You should try. I recently tried a little D coding using chatgpt, wasn't bad considering there's not a lot of D code out there. It's very very good with JavaScript though. I see AI being a very good tool for learning, research and prototyping.
Jul 25