www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Help me decide D or C

reply Alexandre <alexandrelgodoy gmail.com> writes:
Hi everyone,

I would like an honest opinion.
I have a beginner level (able to do very small programs) in a few 
languages  such as python, go, C, guile(scheme) and common lisp. 
I want to pick a language and go deep with it and focus on only 
one for at least the next 2 years or so.

Should I go for C and then when I become a better programmer 
change to D?
Should I start with D right now?

The reason I am considering starting with C: since I am a 
beginner, obvious I will need lots of books, tutorials, videos 
etc. And I believe C would have more resources and maybe a low 
level to help with programming in general. And, when I need a 
more powerful language, I would than learn D. Since you know the 
good and the ugly of the D programming language I wonder, what 
you would think would be the best to do right now?

Thank you for your help!
Jul 31 2019
next sibling parent Andre Pany <andre s-e-a-p.de> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Hi everyone,

 I would like an honest opinion.
 I have a beginner level (able to do very small programs) in a 
 few languages  such as python, go, C, guile(scheme) and common 
 lisp. I want to pick a language and go deep with it and focus 
 on only one for at least the next 2 years or so.

 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?

 The reason I am considering starting with C: since I am a 
 beginner, obvious I will need lots of books, tutorials, videos 
 etc. And I believe C would have more resources and maybe a low 
 level to help with programming in general. And, when I need a 
 more powerful language, I would than learn D. Since you know 
 the good and the ugly of the D programming language I wonder, 
 what you would think would be the best to do right now?

 Thank you for your help!
Hi Alexandre, As you are deciding between C and D I can give you a tipp. Almost all C tutorials and knowledge you can use directly in D. Even the C library is available in D. You can program C within D if you like and switch whenever you need or like to higher concepts which will ease the development. Also other C libraries you can use within D. I would say, you loose nothing while starting with D. Kind regards Andre
Jul 31 2019
prev sibling next sibling parent reply Paul Backus <snarwin gmail.com> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Hi everyone,

 I would like an honest opinion.
 I have a beginner level (able to do very small programs) in a 
 few languages  such as python, go, C, guile(scheme) and common 
 lisp. I want to pick a language and go deep with it and focus 
 on only one for at least the next 2 years or so.

 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?

 The reason I am considering starting with C: since I am a 
 beginner, obvious I will need lots of books, tutorials, videos 
 etc. And I believe C would have more resources and maybe a low 
 level to help with programming in general. And, when I need a 
 more powerful language, I would than learn D. Since you know 
 the good and the ugly of the D programming language I wonder, 
 what you would think would be the best to do right now?

 Thank you for your help!
If you're looking for a language with lots of learning resources available, both C and Python are excellent choices. C is a good choice if you want to learn about how your programs interact with the hardware, and get an idea of how higher-level languages work "under the hood." Python is probably a better choice if you have a specific project in mind that you'd like to work on, like a web application or a game. I would not recommend D as a beginning language, both because there are fewer beginner-oriented resources available for it than for C and Python (the only one I know of is Ali Çehreli's book [1]), and because it's a bigger, more complicated language. [1] http://www.ddili.org/ders/d.en/index.html
Jul 31 2019
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
n 07/31/2019 12:05 PM, Paul Backus wrote:

 I would not recommend D as a beginning language, both because there ar=
e
 fewer beginner-oriented resources available for it than for C and Pyth=
on
 (the only one I know of is Ali =C3=87ehreli's book [1]), and because i=
t's a
 bigger, more complicated language.

 [1] http://www.ddili.org/ders/d.en/index.html
Ali here... :) Thanks for the link and I agree that D is much larger=20 than C. At least for that reason, learning C first or on the side would=20 still be good for the OP. Regarding "Programming in D", although it covers most[1] of the=20 language, it specifically targets beginners; so, it may not be too=20 difficult for the OP. Just give it a try... :) Ali [1] Unfortunately, copy constructors and some of the other recent=20 features are still missing.
Jul 31 2019
parent Alexandre <alexandrelgodoy gmail.com> writes:
On Wednesday, 31 July 2019 at 20:04:39 UTC, Ali Çehreli wrote:
 n 07/31/2019 12:05 PM, Paul Backus wrote:

 I would not recommend D as a beginning language, both because
there are
 fewer beginner-oriented resources available for it than for C
and Python
 (the only one I know of is Ali Çehreli's book [1]), and
because it's a
 bigger, more complicated language.

 [1] http://www.ddili.org/ders/d.en/index.html
Ali here... :) Thanks for the link and I agree that D is much larger than C. At least for that reason, learning C first or on the side would still be good for the OP. Regarding "Programming in D", although it covers most[1] of the language, it specifically targets beginners; so, it may not be too difficult for the OP. Just give it a try... :) Ali [1] Unfortunately, copy constructors and some of the other recent features are still missing.
I am considering reading your book + Andrei's book + documentation on the site. That would be my plan to learn D. Good job with your book btw, I enjoyed a lot the parts I've read.
Jul 31 2019
prev sibling next sibling parent matheus <matheus gmail.com> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 ...
 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?
 ...
I think it depend your intent, but right now for a beginner between C and D I would go with C, because as you noted there are plenty of resources for C, C++, Python etc. In some colleges where I live, 10+ years ago they used to start CS class with C and then C++ or Java, now they start with Python and then C and so on. Python was "more" friendly for beginners to understand variable/algorithm, and after that they would go with data types, pointers... more easily. Good luck, Matheus.
Jul 31 2019
prev sibling next sibling parent reply bachmeier <no spam.net> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Hi everyone,

 I would like an honest opinion.
 I have a beginner level (able to do very small programs) in a 
 few languages  such as python, go, C, guile(scheme) and common 
 lisp. I want to pick a language and go deep with it and focus 
 on only one for at least the next 2 years or so.

 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?

 The reason I am considering starting with C: since I am a 
 beginner, obvious I will need lots of books, tutorials, videos 
 etc. And I believe C would have more resources and maybe a low 
 level to help with programming in general. And, when I need a 
 more powerful language, I would than learn D. Since you know 
 the good and the ugly of the D programming language I wonder, 
 what you would think would be the best to do right now?

 Thank you for your help!
What is your goal? In my opinion, learning C is a waste of time in 2019 unless you have something specific in mind related to a job. C is mostly "fun with segmentation faults". Most of your time is not spent solving problems. If you want to be productive, choose D, Go, Rust, C++, or just about anything but C.
Jul 31 2019
next sibling parent reply Alexandre <alexandrelgodoy gmail.com> writes:
On Wednesday, 31 July 2019 at 22:16:42 UTC, bachmeier wrote:
 On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 [...]
What is your goal? In my opinion, learning C is a waste of time in 2019 unless you have something specific in mind related to a job. C is mostly "fun with segmentation faults". Most of your time is not spent solving problems. If you want to be productive, choose D, Go, Rust, C++, or just about anything but C.
My goals: 1) Improve as a programmer 2) Have fun doing programs Thats it basically. I am planning to study all "free" time I have. I am doing basically this since last year.
Jul 31 2019
next sibling parent reply Kagamin <spam here.lot> writes:
On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote:
 1) Improve as a programmer
 2) Have fun doing programs

 Thats it basically. I am planning to study all "free" time I 
 have. I am doing basically this since last year.
Try Basic. It has builtin graphics, seeing you program draw is quite fascinating.
Aug 01 2019
next sibling parent JN <666total wp.pl> writes:
On Thursday, 1 August 2019 at 09:43:20 UTC, Kagamin wrote:
 On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote:
 1) Improve as a programmer
 2) Have fun doing programs

 Thats it basically. I am planning to study all "free" time I 
 have. I am doing basically this since last year.
Try Basic. It has builtin graphics, seeing you program draw is quite fascinating.
What variant of Basic? Visual Basic? I think https://processing.org/ is the best if you want to "code with drawing"
Aug 01 2019
prev sibling parent matheus <matheus gmail.com> writes:
On Thursday, 1 August 2019 at 09:43:20 UTC, Kagamin wrote:
 On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote:
 1) Improve as a programmer
 2) Have fun doing programs

 Thats it basically. I am planning to study all "free" time I 
 have. I am doing basically this since last year.
Try Basic. It has builtin graphics, seeing you program draw is quite fascinating.
In that case I'd recommend EvalDraw: http://advsys.net/ken/download.htm with a C-like syntax with draw things while you type. Description: "A complete programming environment with built-in compiler, text editor, and functions to allow for quick prototyping. With Evaldraw, you can make graphs in any dimension (1D, 2D, 3D), animations, custom musical instruments, voxel models, and general purpose applications. I've included a lot of examples, so even if you're not a programmer, you can look at the demos" It was written by Ken Silverman (Creator of Build Engine - Duke Nukem 3D). Matheus.
Aug 01 2019
prev sibling parent Tony <tonytdominguez aol.com> writes:
On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote:

 My goals:

 1) Improve as a programmer
 2) Have fun doing programs

 That's it basically. I am planning to study all "free" time I 
 have. I am doing basically this since last year.
Are you only considering D and C or just mentioning them in this forum? The interpreted dynamically-typed languages like Python are considered easier to use and have the largest amount of functionality in their libraries. If it is just down to D or C, then definitely D. C would be at or near the bottom in terms of a language to have fun doing general programming and learning.
Aug 01 2019
prev sibling parent reply SashaGreat <s g.com> writes:
On Wednesday, 31 July 2019 at 22:16:42 UTC, bachmeier wrote:
 What is your goal? In my opinion, learning C is a waste of time 
 in 2019 unless you have something specific in mind related to a 
 job. C is mostly "fun with segmentation faults". Most of your 
 time is not spent solving problems. If you want to be 
 productive, choose D, Go, Rust, C++, or just about anything but 
 C.
Interesting because you asked his goal and no matter what you pretty much just said to avoid C. So why the goal matters here? Kernel, embedded systems, LIBs (In fact there is libspng right now on front page of Reddit - /r/programming) that still uses C. I'm not saying that he should go with C, but if someone is learning I really would avoid D or C++ for the matter. For example there is a lot of things with those languages (D or C++) like attributes: scope, ref, pure, share and so on that is useful but not for beginner. Sasha.
Jul 31 2019
parent reply bachmeier <no spam.net> writes:
On Wednesday, 31 July 2019 at 22:49:10 UTC, SashaGreat wrote:
 On Wednesday, 31 July 2019 at 22:16:42 UTC, bachmeier wrote:
 What is your goal? In my opinion, learning C is a waste of 
 time in 2019 unless you have something specific in mind 
 related to a job. C is mostly "fun with segmentation faults". 
 Most of your time is not spent solving problems. If you want 
 to be productive, choose D, Go, Rust, C++, or just about 
 anything but C.
Interesting because you asked his goal and no matter what you pretty much just said to avoid C. So why the goal matters here?
"In my opinion, learning C is a waste of time in 2019 unless you have something specific in mind related to a job."
 Kernel, embedded systems, LIBs (In fact there is libspng right 
 now on front page of Reddit - /r/programming) that still uses C.
That's very specialized, but sure, some things are still written in C.
 For example there is a lot of things with those languages (D or 
 C++) like attributes: scope, ref, pure, share and so on that is 
 useful but not for beginner.
You can write, say, a CGI app using D without having to get into all of that. I generally don't mess with attributes, templates, or any of that cognitively challenging stuff, and I've been writing D code for six years. Someone that has programmed before could work through Adam's cookbook or Mike's book easily.
Jul 31 2019
parent reply SashaGreat <s g.com> writes:
On Wednesday, 31 July 2019 at 23:11:35 UTC, bachmeier wrote:
 I've been writing D code for six years. Someone that has 
 programmed before could work through Adam's cookbook or Mike's 
 book easily.
About Mike's book, you're talking about this one: https://www.amazon.com/Learning-D-Michael-Parker/dp/1783552484/ref=as_li_ss_tl?ie=UTF8&qid=1448974911&sr=8-1&keywords=learning+d&linkCode=sl1&tag=aldacron-20&linkId=d696b771c78030fc272e9b853986a708 ? I have a friend (who already program) looking for some book besides Ali's online book. Sasha.
Jul 31 2019
parent bachmeier <no spam.net> writes:
On Wednesday, 31 July 2019 at 23:42:10 UTC, SashaGreat wrote:

 About Mike's book, you're talking about this one:

 https://www.amazon.com/Learning-D-Michael-Parker/dp/1783552484/ref=as_li_ss_tl?ie=UTF8&qid=1448974911&sr=8-1&keywords=learning+d&linkCode=sl1&tag=aldacron-20&linkId=d696b771c78030fc272e9b853986a708
Yep. It provides a lot of detail on a lot of topics. We're lucky to have a number of good books.
Aug 01 2019
prev sibling next sibling parent rikki cattermole <rikki cattermole.co.nz> writes:
Whatever direction you choose to go, you should have a good community 
available to help you out.

For D there is the Discord (or IRC, but I think Discord would be more 
suited to you) https://discord.gg/3vFMag7

And there is a Facebook group which I'm apart of which is decent (caters 
to all languages contrary to the name) 
https://www.facebook.com/groups/Javagroup123
Jul 31 2019
prev sibling next sibling parent reply Bert <Bert gmail.com> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Hi everyone,

 I would like an honest opinion.
 I have a beginner level (able to do very small programs) in a 
 few languages  such as python, go, C, guile(scheme) and common 
 lisp. I want to pick a language and go deep with it and focus 
 on only one for at least the next 2 years or so.

 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?

 The reason I am considering starting with C: since I am a 
 beginner, obvious I will need lots of books, tutorials, videos 
 etc. And I believe C would have more resources and maybe a low 
 level to help with programming in general. And, when I need a 
 more powerful language, I would than learn D. Since you know 
 the good and the ugly of the D programming language I wonder, 
 what you would think would be the best to do right now?

 Thank you for your help!
I will go against the grain: Start with both! Yes! You can do it! You can! In fact, you will do it better! It will be a little harder at first but much faster in the end. D is C... no real difference, just minor stuff. Things take time to sink in, so if you start D and C now you will be further down the road than if you start D later. But if you really want to learn to program I suggest you go with Haskell. You can do them all together too but Haskell is like learning Alien while D is learning German.
Jul 31 2019
parent reply bachmeier <no spam.net> writes:
On Thursday, 1 August 2019 at 03:59:23 UTC, Bert wrote:

 But if you really want to learn to program I suggest you go 
 with Haskell. You can do them all together too but Haskell is 
 like learning Alien while D is learning German.
There's nothing wrong with Haskell if you want to take a deep dive into pure functional programming. I personally find Haskell to be more of a religion than a programming language. You can learn the same perspective from functional-first languages like The most common reason I hear for learning C is that you learn the foundation on which everything is built. And in one sense that's kind of true. It's portable assembly. The problem is that you don't learn much about programming, because C has so few features, and that limits you to (a) working on a narrow set of problems or (b) very slowly writing bug-ridden solutions to a wider group of problems. A big part of programming is learning about all the different ways to attack problems. You can go a long way with D, unlike C or Haskell.
Aug 01 2019
parent reply Russel Winder <russel winder.org.uk> writes:
On Thu, 2019-08-01 at 14:49 +0000, bachmeier via Digitalmars-d-learn wrote:
[=E2=80=A6]
 There's nothing wrong with Haskell if you want to take a deep=20
 dive into pure functional programming. I personally find Haskell=20
 to be more of a religion than a programming language. You can=20
 learn the same perspective from functional-first languages like=20

[=E2=80=A6] Whilst I agree that most "this is the one true programming language" people are quasi-religious, programming languages are not: Haskell is a just a laz= y, pure functional programming language, some adherents show quasi-religious fervour, just as some adherents of C++, Java, C, Go, Rust, D, etc. do. and OCaml are very different from Haskell for various reasons, cf. lazy vs. eag= er, pure vs. impure. Haskell is a programming language worth learning for all programmers,along with Lisp, Prolog, and Erlang. I'll bet (but I have no experimental data, just a hypothesis) that any D programmer that knows Haskell writes better D than a D programmer who doesn= 't know Haskell. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Aug 01 2019
parent reply bachmeier <no spam.net> writes:
On Thursday, 1 August 2019 at 22:36:06 UTC, Russel Winder wrote:
 On Thu, 2019-08-01 at 14:49 +0000, bachmeier via 
 Digitalmars-d-learn wrote: […]
 There's nothing wrong with Haskell if you want to take a deep 
 dive into pure functional programming. I personally find 
 Haskell to be more of a religion than a programming language. 
 You can learn the same perspective from functional-first 

[…] Whilst I agree that most "this is the one true programming language" people are quasi-religious, programming languages are not: Haskell is a just a lazy, pure functional programming language, some adherents show quasi-religious fervour, just as some adherents of C++, Java, C, Go, Rust, D, etc. do. Clojure, Scala, and OCaml are very different from Haskell for various reasons, cf. lazy vs. eager, pure vs. impure. Haskell is a programming language worth learning for all programmers,along with Lisp, Prolog, and Erlang. I'll bet (but I have no experimental data, just a hypothesis) that any D programmer that knows Haskell writes better D than a D programmer who doesn't know Haskell.
This is getting somewhat off the topic of this thread, so all I'll say is that I agree with the recommendation to learn Haskell, but I don't think a beginner would get enough exposure to various approaches to programming. I did not personally see large benefits from Haskell, but perhaps I should have stuck with it longer.
Aug 02 2019
next sibling parent Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Friday, August 2, 2019 10:13:04 AM MDT bachmeier via Digitalmars-d-learn 
wrote:
 On Thursday, 1 August 2019 at 22:36:06 UTC, Russel Winder wrote:
 On Thu, 2019-08-01 at 14:49 +0000, bachmeier via
 Digitalmars-d-learn wrote: […]

 There's nothing wrong with Haskell if you want to take a deep
 dive into pure functional programming. I personally find
 Haskell to be more of a religion than a programming language.
 You can learn the same perspective from functional-first

[…] Whilst I agree that most "this is the one true programming language" people are quasi-religious, programming languages are not: Haskell is a just a lazy, pure functional programming language, some adherents show quasi-religious fervour, just as some adherents of C++, Java, C, Go, Rust, D, etc. do. Clojure, Scala, and OCaml are very different from Haskell for various reasons, cf. lazy vs. eager, pure vs. impure. Haskell is a programming language worth learning for all programmers,along with Lisp, Prolog, and Erlang. I'll bet (but I have no experimental data, just a hypothesis) that any D programmer that knows Haskell writes better D than a D programmer who doesn't know Haskell.
This is getting somewhat off the topic of this thread, so all I'll say is that I agree with the recommendation to learn Haskell, but I don't think a beginner would get enough exposure to various approaches to programming. I did not personally see large benefits from Haskell, but perhaps I should have stuck with it longer.
Using Haskell or other similar functional languages can be extremely beneficial towards improving how good you are at recursion, and it can make you much better at functional programming paradigms, because you really don't have much choice when using a language like Haskell. For a couple of years, Haskell was my go-to language for all of my side projects, and I got much better at the functional side of things (e.g. when I first used D templates, I had no problem with their functional nature to the point that I didn't realize that they were functional in nature until I read an article that compared Haskell to C++ templates). That being said, I'd _hate_ to use Haskell for anything serious or for any large projects. It's just too restrictive. My feeling is that functional languages are likely to be a very poor place for most folks to start learning, much as I think that they're great for someone to learn and work with at some point. I have heard of beginning programming classes using functional languages and having it go very well, but it seems hard to believe to me. Imperative programming can already be a lot for beginners, but most people really don't think even vaguely in a functional manner. Even simple recursion tends to be a bit of a mind-bender for people at first. - Jonathan M Davis
Aug 02 2019
prev sibling parent Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-08-02 at 10:25 -0600, Jonathan M Davis via Digitalmars-d-learn
wrote:
=20
[=E2=80=A6]
 My feeling is that functional languages are likely to be a very poor plac=
e
 for most folks to start learning, much as I think that they're great for
 someone to learn and work with at some point. I have heard of beginning
 programming classes using functional languages and having it go very well=
,
 but it seems hard to believe to me. Imperative programming can already be=
a
 lot for beginners, but most people really don't think even vaguely in a
 functional manner. Even simple recursion tends to be a bit of a mind-bend=
er
 for people at first.
[=E2=80=A6] At UCL in the late 1980s and early 1990s, we used a functional programming language in the first term and C++ in the second term for teaching programming. Initially Scheme was the functional programming language but w= e then switched to Miranda (which was a pre-cursor to Haskell). This deep immersion in two totally different programming paradigms worked v= ery well. The mid/late 1990s mad rush to Java everywhere in teaching (of which = I was a part) was in hindsight madness (of a global sort). The move by many institutions to using Python first and then Java rebalances somewhat but is missing the point =E2=80=93 it's about the paradigms. I have retrenched as = a believer in the Haskell/C++, or Prolog/Java, or some such. In the new era with new undergraduates already knowing Scratch and Python, universities should real= ly go the whole hog in getting programming paradigms and programming as a skil= l as well as knowledge, with all the tools,fair and square into the first yea= r curriculum.=20 Of course I have been out of academia for 20 years, and am now out of employment, so my views have no impact. :-) =20 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Aug 02 2019
prev sibling next sibling parent reply a11e99z <black80 bk.ru> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Hi everyone,

 I would like an honest opinion.
 I have a beginner level (able to do very small programs) in a 
 few languages  such as python, go, C, guile(scheme) and common 
 lisp. I want to pick a language and go deep with it and focus 
 on only one for at least the next 2 years or so.
program bouncing ball on few languages and choose that more liked. learning language with numbers and strings only is boring. also you can program tasks from https://www.codingame.com/training/easy with dozen languages in web browser before install to local machine. some of them contains graphics https://www.codingame.com/ide/puzzle/power-of-thor-episode-1 when u run tests. read data from stdin, print result to stdout, and use stderr for debugging with diagnostics messages.
Aug 01 2019
parent reply a11e99z <black80 bk.ru> writes:
On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote:
 On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Hi everyone,

 I would like an honest opinion.
 I have a beginner level (able to do very small programs) in a 
 few languages  such as python, go, C, guile(scheme) and common 
 lisp. I want to pick a language and go deep with it and focus 
 on only one for at least the next 2 years or so.
program bouncing ball on few languages and choose that more liked. learning language with numbers and strings only is boring. also you can program tasks from https://www.codingame.com/training/easy with dozen languages in web browser before install to local machine. some of them contains graphics https://www.codingame.com/ide/puzzle/power-of-thor-episode-1 when u run tests. read data from stdin, print result to stdout, and use stderr for debugging with diagnostics messages.
imo better choice is (with criteria to find best job) - Qt: C++ with any library that u need in one style web, graphics, mobiles, command tools with nice language. - Java/Kotlin: Machine of Java and Kotlin) still does not support value types, that is sucks. - JavaScript/TypeScript: web-browser language with node.js that allows to program server side too. - You can try Python too. another dynamic language (as JavaScript). I don't like langs that based on space/tabs so I can not say anything about it. C is too low level language. and many resources is not best criteria for it. (like people says "there's definitely something in the shit, a million flies can't be wrong"). D is stuck in some middle ages with subsistence economy, they still have stone tools but now they found iron/steel :)
Aug 01 2019
parent reply Alexandre <alexandrelgodoy gmail.com> writes:
On Thursday, 1 August 2019 at 15:42:08 UTC, a11e99z wrote:
 On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote:
 [...]
imo better choice is (with criteria to find best job) - Qt: C++ with any library that u need in one style web, graphics, mobiles, command tools with nice language. - Java/Kotlin: Machine of Java and Kotlin) still does not support value types, that is sucks. - JavaScript/TypeScript: web-browser language with node.js that allows to program server side too. - You can try Python too. another dynamic language (as JavaScript). I don't like langs that based on space/tabs so I can not say anything about it. [...]
Right now, job is not a good criteria for me. I work in a not related field and I doubt I would get any job working with CS. That would be great, but I doubt it anyway, so it is more a hobby thing.
Aug 01 2019
parent reply =?UTF-8?B?QXVyw6lsaWVu?= Plazzotta <here gmail.com> writes:
On Thursday, 1 August 2019 at 16:23:51 UTC, Alexandre wrote:
 On Thursday, 1 August 2019 at 15:42:08 UTC, a11e99z wrote:
 On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote:
 Right now, job is not a good criteria for me. I work in a not 
 related field and I doubt I would get any job working with CS. 
 That would be great, but I doubt it anyway, so it is more a 
 hobby thing.
If penetrating a job segment-market is not a requirement, perhaps you would take pleasure in learning F*. It is a pure functional programming language based on logical-mathematical thought. It meant to be a replacement for Coq, a proof-assistant turned into general-purpose language. In my opinion, this kind of paradigm would fit quite well in the near-future RISCV technological and commercial market since their technical specifications have been feature-ready. Here is the official tutorial for F* language: https://www.fstar-lang.org/tutorial/ I hope this kind of project is the last step before entering the realm of quantum programming because it is time to embrace the change. Quantum mechanics are known since the 1930's, quantum physics since 50's, quantum information since 70's, quantum computation since 2000's. What are we waiting for quantum programming? Again the same and always pathological syndromes remain: "not invented here" and "it's if not broken, don't fix it." But don't fool yourself, D is not for beginners. Ali Çehreli is a very skilled programmer, ergo, he can't reason like a new/starting programmer anymore, regardless of his patience and kindness.
Aug 01 2019
parent reply Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Thursday, 1 August 2019 at 20:02:08 UTC, Aurélien Plazzotta 
wrote:
[...]
 But don't fool yourself, D is not for beginners. Ali Çehreli is 
 a very skilled programmer, ergo, he can't reason like a 
 new/starting programmer anymore, regardless of his patience and 
 kindness.
I am sorry, but this is very strange reasoning. Would you recommend a book on programming written by someone who is not a skilled programmer himself in any language? I certainly would not. Besides, the OP has already expressed his appreciation for Ali’s writing. Bastiaan.
Aug 02 2019
parent bachmeier <no spam.net> writes:
On Friday, 2 August 2019 at 13:57:44 UTC, Bastiaan Veelo wrote:
 On Thursday, 1 August 2019 at 20:02:08 UTC, Aurélien Plazzotta 
 wrote:
 [...]
 But don't fool yourself, D is not for beginners. Ali Çehreli 
 is a very skilled programmer, ergo, he can't reason like a 
 new/starting programmer anymore, regardless of his patience 
 and kindness.
I am sorry, but this is very strange reasoning. Would you recommend a book on programming written by someone who is not a skilled programmer himself in any language? I certainly would not.
Even stranger when you consider the earlier recommendation to
 take pleasure in learning F*. It is a pure functional 
 programming language based on logical-mathematical thought
Aug 02 2019
prev sibling next sibling parent ryuo <ryuo ryuo.xyz> writes:
I have spent the better part of 10 years with C, and it was my 
first serious language. I would say go with D if you just want to 
work on higher level projects and forego the low level details to 
an extent. C is very low level and very unforgiving. The 
inexperienced will run into things like segmentation faults or 
other memory errors until they understand how pointers and memory 
works.

Also, while D has fewer available resources than C does, C is 
also an entirely different beast. The C standard library is very 
limited, only providing some very basic functionality. Advanced 
data structure implementations are not provided by it so you 
would be forced to either write your own or use a suitable third 
party library. Contrast this with C++ or D where such things are 
likely already provided by their standard libraries.

In short, C is generally used to implement a foundation of sorts 
for higher level programs or other ventures where low level 
control is a requirement. For example, it is common to implement 
general purpose libraries for things like compression or 
encryption in C for performance reasons and also for reusable 
code. Libraries written in C can generally be used by any 
language that runs natively, usually through a binding or a 
translation of the library API.
Aug 01 2019
prev sibling next sibling parent IGotD- <nise nise.com> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Hi everyone,

 I would like an honest opinion.
 I have a beginner level (able to do very small programs) in a 
 few languages  such as python, go, C, guile(scheme) and common 
 lisp. I want to pick a language and go deep with it and focus 
 on only one for at least the next 2 years or so.

 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?

 The reason I am considering starting with C: since I am a 
 beginner, obvious I will need lots of books, tutorials, videos 
 etc. And I believe C would have more resources and maybe a low 
 level to help with programming in general. And, when I need a 
 more powerful language, I would than learn D. Since you know 
 the good and the ugly of the D programming language I wonder, 
 what you would think would be the best to do right now?

 Thank you for your help!
It depends what you want to do. C is a good language for low level, embedded programming. For "higher" level programming like web clients/servers, text processing, programs with graphical user interface then C is just awful because it has fewer built in primitives and libraries. Also with more complicated program C in general requires more boiler plate. Then we have C++ but in general it has the same problems as I mentioned with C but programming is slightly more convenient as it has classes, exceptions and some more powerful libraries due to templates, operator overloading such things. D is somewhere in the middle between Java and C++. Syntax is much better and intuitive than C++. Thanks to that it is more inspired by Java, the libraries are in general more convenient to use and cleaner. I'd say D is a good choice for learning programming as it sits in the high seat of low level and high level. No, other language combines that as good as D I think. Also if you start with D you can easily go to C++ or Java. I'd say start with D and then learn C++ because it would be interesting to hear from a person who learn D first, thinks of C++.
Aug 02 2019
prev sibling next sibling parent Guillaume Piolat <first.last gmail.com> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?
D and C++ (and probably other languages) inherit features of C such as operator precendence, integer promotion, and a few things. So learning these specific points of C will pay dividends. However, I don't see any other reason - apart from platform support maybe - to bother with C when D is available.
Aug 02 2019
prev sibling next sibling parent reply berni <someone somewhere.com> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?
In my oppinion C should have been deprecated about 50 years ago and it's not worth while to learn it if you are not interested in the history of programming or you have to learn it, because you need to maintain software which is allready written in C. But that's my oppinion; others may have a different sight. I would recommend to start immediately with D (using the book of Ali, which has allready been mentioned). When you've got mastered D you will not have any problems switching to an other language. And you don't need to know everything about D to write programs. For example you do not need to use templates in the beginning. You might find out a strange looking syntax for type conversion "to!string(17)" with this exclamation mark in between, which you can just accept and us as is, without having to understand what it's good for. I would even go further and state, that learning C first will become a burden instead of a help.
Aug 02 2019
next sibling parent Daniel Kozak <kozzi11 gmail.com> writes:
On Fri, Aug 2, 2019 at 2:30 PM berni via Digitalmars-d-learn
<digitalmars-d-learn puremagic.com> wrote:
 ...
 I would even go further and state, that learning C first will
 become a burden instead of a help.
Yes, I agree with this. It is same as with C++. Many people starts with C and then learn C++. Which is really not a good idea.
Aug 02 2019
prev sibling parent reply SashaGreat <s g.com> writes:
On Friday, 2 August 2019 at 12:28:45 UTC, berni wrote:
 On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?
In my oppinion C should have been deprecated about 50 years ago ...
I stopped there. How could you have deprecated a language 50 years ago since was first released in '72 (47 years ago). C like it or not is still highly used today (Kernel, LIB, Embedded Systems). If it was so terrible as you and others are saying it would be damned a long time ago. It has flaws? Sure, but like C++, D, Java, Go, Python has it owns flaws too and they all came later. Sasha.
Aug 02 2019
parent reply berni <someone somewhere.com> writes:
On Friday, 2 August 2019 at 14:05:20 UTC, SashaGreat wrote:
 On Friday, 2 August 2019 at 12:28:45 UTC, berni wrote:
 On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?
In my oppinion C should have been deprecated about 50 years ago ...
I stopped there. How could you have deprecated a language 50 years ago since was first released in '72 (47 years ago).
Yes, that was intentional. What I wanted to say is, that I think, that it would have been better, if C was never invented at all... In that case, there would have been space for an other language for writing operating systems, without that much bugs in its design. (But one never knows afterwards...)
Aug 02 2019
parent Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-08-02 at 17:25 +0000, berni via Digitalmars-d-learn wrote:
 [=E2=80=A6]
=20
 Yes, that was intentional. What I wanted to say is, that I think,=20
 that it would have been better, if C was never invented at all...=20
 In that case, there would have been space for an other language=20
 for writing operating systems, without that much bugs in its=20
 design. (But one never knows afterwards...)
If C had not been invented by Ritchie, Thompson, et al., something very lik= e it would have been invented by someone else. BCPL and B were not really gaining the traction they perhaps should have had, and Algol, Algol68, FORTRAN, PL/1, COBOL, etc. were not really designed for writing operating systems. https://en.wikipedia.org/wiki/Timeline_of_programming_languages The problem was not the invention of C, the problem was all those programme= rs who stopped thinking about using the right tool for a given task in a given context, and started using C for all programming situations. But it happene= d, it is read-only history. Rust, D, and Go are the current ways out of the tragedy that was using C for applications programming. C++ is finally catch= ing up. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Aug 03 2019
prev sibling next sibling parent reply Alexandre <alexandrelgodoy gmail.com> writes:
On Friday, 2 August 2019 at 12:30:44 UTC, berni wrote:
 On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 [...]
In my oppinion C should have been deprecated about 50 years ago and it's not worth while to learn it if you are not interested in the history of programming or you have to learn it, because you need to maintain software which is allready written in C. But that's my oppinion; others may have a different sight. [...]
Could you elaborate more about C being a burden? I have read so many people saying C gives a great foundation and should be everyone's first language. Now I am confused.
Aug 02 2019
next sibling parent Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Friday, 2 August 2019 at 13:45:17 UTC, Alexandre wrote:
 On Friday, 2 August 2019 at 12:30:44 UTC, berni wrote:
 On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 [...]
In my oppinion C should have been deprecated about 50 years ago and it's not worth while to learn it if you are not interested in the history of programming or you have to learn it, because you need to maintain software which is allready written in C. But that's my oppinion; others may have a different sight. [...]
Could you elaborate more about C being a burden? I have read so many people saying C gives a great foundation and should be everyone's first language. Now I am confused.
One example is this recent post: https://forum.dlang.org/post/yjgkatpbkdyyksldgrhf forum.dlang.org “[...] recently all the problems I am having with D are because D is actually superior to C and some assumptions I still have because of C should be uninstalled from my brain.” If you plan on ending up with D anyway, I think that learning C first is an unnecessary detour and can be counter productive in some ways. And if your objective is to have fun, I would recommend against C (except for a masochistic kind of fun). Don’t take the detour, take the D tour! :-) Bastiaan.
Aug 02 2019
prev sibling parent reply Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-08-02 at 13:45 +0000, Alexandre via Digitalmars-d-learn wrote:
=20
[=E2=80=A6]
 Could you elaborate more about C being a burden? I have read so=20
 many people saying C gives a great foundation and should be=20
 everyone's first language. Now I am confused.
C is a programming language created in the early 1970s to make writing UNIX easier. Early versions of UNIX (and Multics before it) were written in assembly language. Dennis Ritchie et al. wanted to use a programming langua= ge that had a higher level of abstraction than assembly language so as to make writing UNIX easier. BCPL gave many of the ideas for B which led to C, effectively a portable assembly language but with special eyes on the PDP-8= , PDP-11, and later VAX-11 machine codes. C was hugely successful for writing operating systems because it was "close to the metal" and yet with better abstractions than assembly language. I spent many happy (and many unhappy) hours in the early 1980s writing device drivers for UNIX 6, UNIX 7, and BSD 4.0. C was the right tool for the job at hand at that time. Many tools associated with UNIX were written in C, including the C compiler= , since the only other option at the time in the UNIX context was assembly language. Already though there was the question: was C the right tool for t= he job of writing applications =E2=80=93 as opposed to hardware controlling so= ftware. One could argue that "buffer overruns" was clear evidence that C was the wrong tool for the job. Unfortunately the obsession with C, even if it was not the right tool for t= he job at hand, had taken hold: if you didn't write your application in C you were somehow a second or third rate human being, let alone programmer. Then came C++ (or then C with Classes) and the beginning of the rift betwee= n the C camp and the "we need a programming language with higher levels of abstraction" camp. I am sure many can write lots on the 1990s and 2000s and the various language wars, but here we are in 2010s entering the 2020s and = we have D, Rust, Go, Java, Kotlin, Python, Ruby, C++, Lisp, Prolog, Erlang, et= c. all of which have their problems, but all of which have their "sweet spots" for being the right tool for the job at hand. C is no longer the de facto standard language for writing all software. People are increasingly recognising that it is as if C were specifically created for writing softwa= re that controls hardware.=20 C still has a role in the world of programming, and it definitely has a sta= tus as one of the most important programming languages ever. Moral of this story is that, for me, in 2019, if you are writing applicatio= ns software or software tools, C is not the right tool for the job. =20 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Aug 02 2019
parent reply Alexandre <alexandrelgodoy gmail.com> writes:
On Friday, 2 August 2019 at 15:51:25 UTC, Russel Winder wrote:
 On Fri, 2019-08-02 at 13:45 +0000, Alexandre via 
 Digitalmars-d-learn wrote:
 
[…]
 Could you elaborate more about C being a burden? I have read 
 so many people saying C gives a great foundation and should be 
 everyone's first language. Now I am confused.
C is a programming language created in the early 1970s to make writing UNIX easier. Early versions of UNIX (and Multics before it) were written in assembly language. Dennis Ritchie et al. wanted to use a programming language that had a higher level of abstraction than assembly language so as to make writing UNIX easier. BCPL gave many of the ideas for B which led to C, effectively a portable assembly language but with special eyes on the PDP-8, PDP-11, and later VAX-11 machine codes. C was hugely successful for writing operating systems because it was "close to the metal" and yet with better abstractions than assembly language. I spent many happy (and many unhappy) hours in the early 1980s writing device drivers for UNIX 6, UNIX 7, and BSD 4.0. C was the right tool for the job at hand at that time. Many tools associated with UNIX were written in C, including the C compiler, since the only other option at the time in the UNIX context was assembly language. Already though there was the question: was C the right tool for the job of writing applications – as opposed to hardware controlling software. One could argue that "buffer overruns" was clear evidence that C was the wrong tool for the job. Unfortunately the obsession with C, even if it was not the right tool for the job at hand, had taken hold: if you didn't write your application in C you were somehow a second or third rate human being, let alone programmer. Then came C++ (or then C with Classes) and the beginning of the rift between the C camp and the "we need a programming language with higher levels of abstraction" camp. I am sure many can write lots on the 1990s and 2000s and the various language wars, but here we are in 2010s entering the 2020s and we have D, Rust, Go, Java, Kotlin, Python, Ruby, C++, Lisp, Prolog, Erlang, etc. all of which have their problems, but all of which have their "sweet spots" for being the right tool for the job at hand. C is no longer the de facto standard language for writing all software. People are increasingly recognising that it is as if C were specifically created for writing software that controls hardware. C still has a role in the world of programming, and it definitely has a status as one of the most important programming languages ever. Moral of this story is that, for me, in 2019, if you are writing applications software or software tools, C is not the right tool for the job.
Do you thing D would be the right tool for the job at this point for me? Assuming I have 2 goals in mind: 1) become a better programmer and 2) want to make fun writing software for myself and if possible show something I might be proud of. I thought C would be a better choice for the 1), because everyone says it's great to see whats behind the hood and things like that. My experience with C btw is CS50 course, plus around 200/300 pages of some books, still reading and a few toy projects. So, basically 0 knowledge. haha. But after reading your opinion, I guess C might not be the right tool for me, since I wont be doing any kind of thing related to hardware (I think). I have receive so many good opinions so far. I realize there is no consensus what so ever. As I was suggested Haskell, Python, D, C etc. It's a good thing, but hard to make a decision.
Aug 02 2019
parent Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-08-02 at 16:49 +0000, Alexandre via Digitalmars-d-learn wrote:
[=E2=80=A6]
=20
 Do you thing D would be the right tool for the job at this point=20
 for me? Assuming I have 2 goals in mind: 1) become a better=20
 programmer and 2) want to make fun writing software for myself=20
 and if possible show something I might be proud of.
 I thought C would be a better choice for the 1), because everyone=20
 says it's great to see whats behind the hood and things like=20
 that. My experience with C btw is CS50 course, plus around=20
 200/300 pages of some books, still reading and a few toy=20
 projects. So, basically 0 knowledge. haha. But after reading your=20
 opinion, I guess C might not be the right tool for me, since I=20
 wont be doing any kind of thing related to hardware (I think).
Seeing what is behind the hood was important in the 1970s and 1980s because the hardware was constrained and programming languages (other than perhaps Lisp) were still trying to provide abstractions over the extant hardware. I= n the 2000s and 2010s "seeing what is under the hood" is more or less irrelev= ant for most applications programmers =E2=80=93 this does not include people fo= r whom hard real time factors are critical to their software. Most application programm= ers should be focusing on using the right algorithms and data structures for th= e task and letting the compilers and their code generators worry about what i= s "under the hood". Programming for microcontrollers is a different game and C dominates there still (I assume, it is over a decade since I was doing that stuff), and for good reason, the algorithms and data structures are hardware oriented rathe= r than being abstract. And when your hardware has bit data structures, so doe= s your programming language: C compilers for 8051 and AVR chips have special extensions to allow bit access. As for your 2, what do you find fun to create software for? It is then a question of choosing the language that best enables you to simply and easil= y create the data structures and thence the algorithms for those problems. Be= ing able to show off software and be proud of it revolves around having the simplest and most understandable expressions of the best data structures an= d algorithms for the problem addressed. C can be used for this but you end up hacking this very badly, and opening yourself up to horrors such as buffer overrun.=20 My pet project of the moment is a DVB player (Me TV). It was originally a C program authored by someone else who then began transforming it to a mixed C/C++ system. It's original goal was to compete with MythTV and Kodi, but i= t lost. When I picked it up I decided to strip it all back so as to be a lightweight player to complement rather than compete with MythTV and Kodi. = It became very clear, very quickly that C++11 and indeed C++14 were not the ri= ght tools for the job (poor support for messaging between threads being the sin= gle biggest problem). I decided to do a re-write from scratch in D using GtkD a= nd GStreamerD. It all went well, D provided all the tools for creating the rig= ht abstractions; the right data structures and algorithms were easy to express and the libraries gave really good access to the underlying C libraries. But=E2=80=A6 the GStreamer folk had rejected D as an officially supported l= anguage for plugins and official API wrapper/binding support. Does this matter given Mike's efforts keeping GtkD and GStreamerD up to date? In my case yes. I ha= d to get involved in amendments to GStreamer itself and developing new API wrapper. I guess I could have kept going with D as the implementation langu= age for Me TV, but it seemed right to switch to Rust, which is officially supported by the GStreamer folk, so lots of extra support for GStreamer changes and wrapper writing (I guess I will end up doing a D version for Mi= ke to add to GStreamerD). It turns out that Rust is actually the wrong tool fo= r the job of working with GObject systems and yet the GStreamer folk chose Ru= st because they abhorred C++ and assumed D always came with a garbage collecto= r (which is true in this case) and they have a morbid hatred of garbage collection (true for some bits of GStreamer which are hard real time). What the gtk-rs people have done though is to provide an excellent (albeit not totally complete as yet) Rust inheritance system for GObject-based code. Of course D has inheritance and so no problem, D is better than Rust for this. Objectively D is the better language for GObject-based software, and yet Ru= st is in the driving seat. Is this another "everyone used C for applications programming but shouldn't have done" moment? Almost. Rust is fine for those cases where composition i= s the right abstraction approach. D can also do this, ditto Go, and indeed Ja= va, Kotlin, etc. Where a core abstraction requirement is inheritance, as in GObject-based systems, D beats Rust. And yet the gtk-rs folk have used Rust anyway and created the abstractions. What is the moral behind this story of mixed messages? There are many, some are: prejudices can make people make the wrong choices and then patch thing= s up; using the right libraries is always a good idea; sometime you make a choice based on accepting some negative aspects just trying to maximise the positive ones. =20 What I haven't mentioned as yet is editor/IDE support, this must not be underestimated. Support for writing Go, Rust, C, C++, Java, Kotlin, etc. co= de is very strong. Originally a vi person I switched to Emacs and have been an Emacs addict since the mid 1980s. The came the IDE, and I have become a bit= of a JetBrains fan. CLion, Goland, IntelliJIDEA, and PyCharm are sponditious. They make Emacs seem a bit pathetic for developing Go, Rust, C, C++, Java, Kotlin, Groovy, etc. code. CLion support for Rust makes writing Rust code easier. There is a the beginnings of a D plugin (indeed I ought to be helping work = on it but am failing to do that), but the Rust plugin is already wonderful. Th= is is mostly because JetBrains see an income stream form supporting Rust, but = see no such income stream from supporting D. This is arguably D biggest problem= , the editor and IDE supprt for D is second, even third, rate compared to the support available for Go, Rust, Java, Kotlin, Groovy, C, and C++. No matter how good a language is, it is only as good as the editor and IDE support. So despite D being better than Rust for Me TV, I use Rust because the inheritance issue is patched up in the gtk-rs library, and I can develp the= Me TV software, and especially debug SIGSEGV, far better in CLion using Rust t= han trying to use D. Sadly there seems to be a inherent belief in the D communi= ty at large that VIM (or Emacs) is all you need. For those individuals that ma= y be true. However Visual Studio and CLion is where the native code developme= nt action is for programmers who want an easier life.
 I have receive so many good opinions so far. I realize there is=20
 no consensus what so ever. As I was suggested Haskell, Python, D,=20
 C etc. It's a good thing, but hard to make a decision.
Lots of people means lots of opinions! But the arguments were sensible and presented in good faith: they just reflected the variables: what programmin= g do you already know; what is the software being written for; and what is th= e execution platform of the software once written. This must lead to many variations, and so in the end an individual in a given situation has to "plump" for a choice, and then follow through. Without knowing the problem that are fun for you it is difficult to pin thi= ngs down further than D, Go, Rust, Java, and Kotlin are all good languages for writing applications.=20 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Aug 03 2019
prev sibling next sibling parent reply Jon Degenhardt <jond noreply.com> writes:
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote:
 Should I go for C and then when I become a better programmer 
 change to D?
 Should I start with D right now?
In my view, the most important thing is the decision you've already made - to pick a programming language and learn it in a reasonable bit of depth. Which programming language you choose is less important. No matter which choice you make you'll have the opportunity to learn skills that will transfer to other programming languages. As you can tell from the other responses, the pros and cons of a learning a specific language depend quite a bit on what you hope to get out of it, and are to a fair extent subjective. But both C and D provide meaningful opportunities to gain worthwhile experience. A couple reasons for considering learning D over C are its support for functional programming and templates. These were also mentioned by a few other people. These are not really "beginner" topics, but as one moves past the beginner stage they are really quite valuable techniques to start mastering. For both D is the far better option, and it's not necessary to use either when starting out. --Jon
Aug 02 2019
parent reply Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-08-02 at 20:24 +0000, Jon Degenhardt via Digitalmars-d-learn
wrote:
[=E2=80=A6]
 In my view, the most important thing is the decision you've=20
 already made - to pick a programming language and learn it in a=20
 reasonable bit of depth. Which programming language you choose is=20
 less important. No matter which choice you make you'll have the=20
 opportunity to learn skills that will transfer to other=20
 programming languages.
=20
[=E2=80=A6] Knowing what a given programming language is best for is core here: so no using Prolog to try and write an operating system on real hardware. Knowing many paradigms well is proven experimentally (see the work by Petre= , Green, Gilmore, and others) to improve capability in any given language. So knowing Java, Prolog, Lisp, Python, SQL, C, Go, Rust, D, Kotlin, Groovy, Ru= by to a goodly level of competence makes you a better programmer in any one of them. So no matter which language you learn always plan to learn others. In this sense C and D are equal, but for applications I'd choose D over C. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Aug 03 2019
parent =?UTF-8?B?QXVyw6lsaWVu?= Plazzotta <aurelien.plazzotta protonmail.com> writes:
On Saturday, 3 August 2019 at 12:29:18 UTC, Russel Winder wrote:

 Knowing many paradigms well is proven experimentally (see the 
 work by Petre, Green, Gilmore, and others) to improve 
 capability in any given language. So knowing Java, Prolog, 
 Lisp, Python, SQL, C, Go, Rust, D, Kotlin, Groovy, Ruby to a 
 goodly level of competence makes you a better programmer in any 
 one of them.
Thank you Russel Winder. Thanks to your comment, I was able to find the book you spoke of and ordered it immediately. For those who may be interested, here it is: Psychology of Programming (Computers and People Series), written by J-M Hoc, T.R.G. Green, R. samurcay, & D. Gilmore, published in 1991 by Academic Press. As for me, it is interesting to notice that the authors of this book work for Inria, the same French Institute who created F* language in partnership with Microsoft Research, along with Low*, a subset of F* language and its librairies, focused on C features (e.g. the C memory model, stack and heap-allocated arrays, machine integers, C string literals, etc.). See https://fstarlang.github.io/lowstar/html/Introduction.html for more details. It is really refreshing for the community to have someone like you who keep connections with other languages, technologies and paradigms. I wish you the best!
Aug 04 2019
prev sibling next sibling parent Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Friday, August 2, 2019 11:05:13 AM MDT Russel Winder via Digitalmars-d-
learn wrote:
 On Fri, 2019-08-02 at 10:25 -0600, Jonathan M Davis via
 Digitalmars-d-learn wrote:

 […]

 My feeling is that functional languages are likely to be a very poor
 place for most folks to start learning, much as I think that they're
 great for someone to learn and work with at some point. I have heard of
 beginning programming classes using functional languages and having it
 go very well, but it seems hard to believe to me. Imperative
 programming can already be a lot for beginners, but most people really
 don't think even vaguely in a functional manner. Even simple recursion
 tends to be a bit of a mind-bender for people at first.
[…] At UCL in the late 1980s and early 1990s, we used a functional programming language in the first term and C++ in the second term for teaching programming. Initially Scheme was the functional programming language but we then switched to Miranda (which was a pre-cursor to Haskell). This deep immersion in two totally different programming paradigms worked very well. The mid/late 1990s mad rush to Java everywhere in teaching (of which I was a part) was in hindsight madness (of a global sort). The move by many institutions to using Python first and then Java rebalances somewhat but is missing the point – it's about the paradigms. I have retrenched as a believer in the Haskell/C++, or Prolog/Java, or some such. In the new era with new undergraduates already knowing Scratch and Python, universities should really go the whole hog in getting programming paradigms and programming as a skill as well as knowledge, with all the tools,fair and square into the first year curriculum. Of course I have been out of academia for 20 years, and am now out of employment, so my views have no impact. :-)
The university I went to had an undergrad class on programming paradigms that I _think_ was required (maybe two even), but it was definitely just the focus of a small number of classes, whereas my experience is that you get a lot more out of it when you actually use a language with a different paradigm for a while rather than just doing one group of assignments in it - and when the class covers multiple programming paradigms, that also dilutes how much you get out of each. On some level, as with many things, a lot of it depends on how much the students decide to put into it on their own. I still find it funny that the class that got me started with Haskell was the grad version of the programming paradigms course, and we used Haskell only because the teacher was always using Scheme (in fact, he was a developer for Dr. Scheme IIRC) and felt like doing something different. So, while I'd used Scheme some in an undergrad course, I ended up using Haskell in the course with the teacher who was majorly into Scheme. It seemed a bit like if one of the major D contributors decided to use Rust for a bit just to try something different. Of course, I haven't done anywhere near as good a job at learning new languages for a while now, because I've been focused enough on D that I haven't really wanted to spend time writing programs in something else. And I don't think that it works very well to really learn a language if you don't use it as your go-to language for a while (at least if you want to be good at more than the basics). There's no question though that I'm better at D thanks to the time I spent on languages such as Haskell. - Jonathan M Davis
Aug 02 2019
prev sibling parent Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-08-02 at 23:24 -0600, Jonathan M Davis via Digitalmars-d-learn
wrote:
[=E2=80=A6]
 The university I went to had an undergrad class on programming paradigms
 that I _think_ was required (maybe two even), but it was definitely just =
the
 focus of a small number of classes, whereas my experience is that you get=
a
 lot more out of it when you actually use a language with a different
 paradigm for a while rather than just doing one group of assignments in i=
t -
 and when the class covers multiple programming paradigms, that also dilut=
es
 how much you get out of each. On some level, as with many things, a lot o=
f
 it depends on how much the students decide to put into it on their own.
[=E2=80=A6] UCL used to have a 10 week module that tried to do three language to show t= hat different programming languages were best for different problems. Prolog, Snobol, and ??? were the trio when we terminated the module as not being effective. This reinforced having a third programming language module in th= e compulsory programming sequence so as to have 10 weeks per language rather than three. Still not really long enough but it worked a lot better. I think universities will be far better able to teach programming now that entrants already know Python (to a greater or lesser extent). The single biggest problem will be (has always been) having academics on the staff competent and willing to put on programming courses. Far too many academics= in universities are truly crap programmers and are the last people you want to show their crapness to students. =20 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Aug 03 2019