Re: Help me decide D or C

2019-08-04 Thread Aurélien Plazzotta via Digitalmars-d-learn

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!


Re: Help me decide D or C

2019-08-03 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2019-08-02 at 20:24 +, Jon Degenhardt via Digitalmars-d-learn
wrote:
[…]
> 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.
> 
[…]

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, Ruby
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.


-- 
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



signature.asc
Description: This is a digitally signed message part


Re: Help me decide D or C

2019-08-03 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2019-08-02 at 16:49 +, Alexandre via Digitalmars-d-learn wrote:
[…]
> 
> 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).

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. In
the 2000s and 2010s "seeing what is under the hood" is more or less irrelevant
for most applications programmers – this does not include people for whom hard
real time factors are critical to their software. Most application programmers
should be focusing on using the right algorithms and data structures for the
task and letting the compilers and their code generators worry about what is
"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 rather
than being abstract. And when your hardware has bit data structures, so does
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 easily
create the data structures and thence the algorithms for those problems. Being
able to show off software and be proud of it revolves around having the
simplest and most understandable expressions of the best data structures and
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. 

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 it
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 right
tools for the job (poor support for messaging between threads being the single
biggest problem). I decided to do a re-write from scratch in D using GtkD and
GStreamerD. It all went well, D provided all the tools for creating the right
abstractions; the right data structures and algorithms were easy to express
and the libraries gave really good access to the underlying C libraries.

But… the GStreamer folk had rejected D as an officially supported language 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 had
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 language
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 Mike
to add to GStreamerD). It turns out that Rust is actually the wrong tool for
the job of working with GObject systems and yet the GStreamer folk chose Rust
because they abhorred C++ and assumed D always came with a garbage collector
(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 Rust
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 is
the right abstraction approach. D can also do this, ditto Go, and indeed Java,
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 messa

Re: Help me decide D or C

2019-08-03 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2019-08-02 at 17:25 +, berni via Digitalmars-d-learn wrote:
> […]
> 
> 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...)

If C had not been invented by Ritchie, Thompson, et al., something very like
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 programmers
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 happened,
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 catching
up.

-- 
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



signature.asc
Description: This is a digitally signed message part


Re: Help me decide D or C

2019-08-02 Thread Jon Degenhardt via Digitalmars-d-learn

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


Re: Help me decide D or C

2019-08-02 Thread berni via Digitalmars-d-learn

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...)




Re: Help me decide D or C

2019-08-02 Thread Alexandre via Digitalmars-d-learn

On Friday, 2 August 2019 at 15:51:25 UTC, Russel Winder wrote:
On Fri, 2019-08-02 at 13:45 +, 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.


Re: Help me decide D or C

2019-08-02 Thread Jonathan M Davis via Digitalmars-d-learn
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 +, 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
> >> languages like Clojure, Scala, Ocaml, and F#.
> >
> > […]
> >
> > 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.
> >
> > I am not sure about F# (I do not know anything of it), but
> > 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






Re: Help me decide D or C

2019-08-02 Thread bachmeier via Digitalmars-d-learn

On Thursday, 1 August 2019 at 22:36:06 UTC, Russel Winder wrote:
On Thu, 2019-08-01 at 14:49 +, 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 
languages like Clojure, Scala, Ocaml, and F#.

[…]

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.


I am not sure about F# (I do not know anything of it), but 
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.


Re: Help me decide D or C

2019-08-02 Thread bachmeier via Digitalmars-d-learn

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


Re: Help me decide D or C

2019-08-02 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2019-08-02 at 13:45 +, 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.
 
-- 
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



signature.asc
Description: This is a digitally signed message part


Re: Help me decide D or C

2019-08-02 Thread Bastiaan Veelo via Digitalmars-d-learn

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/yjgkatpbkdyyksldg...@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.


Re: Help me decide D or C

2019-08-02 Thread SashaGreat via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-08-02 Thread Bastiaan Veelo via Digitalmars-d-learn
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.



Re: Help me decide D or C

2019-08-02 Thread Alexandre via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-08-02 Thread Daniel Kozak via Digitalmars-d-learn
On Fri, Aug 2, 2019 at 2:30 PM berni via Digitalmars-d-learn
 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.


Re: Help me decide D or C

2019-08-02 Thread berni via Digitalmars-d-learn

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.






Re: Help me decide D or C

2019-08-02 Thread berni via Digitalmars-d-learn

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.






Re: Help me decide D or C

2019-08-02 Thread Guillaume Piolat via Digitalmars-d-learn

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.





Re: Help me decide D or C

2019-08-02 Thread IGotD- via Digitalmars-d-learn

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++.




Re: Help me decide D or C

2019-08-01 Thread Tony via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-08-01 Thread ryuo via Digitalmars-d-learn
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.




Re: Help me decide D or C

2019-08-01 Thread Murilo via Digitalmars-d-learn

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?


Here goes something that may help you. A multimedia tutorial in D 
with a lib called arsd. I am nearly done with the tutorial and it 
is now very complete, it now teaches how to use the arsd library 
to draw all sorts of stuff and to receive mouse and keyboard 
input. I think you will like it. If you use it and like it please 
let me know because I would be very happy to see my work being 
spread. Cheers. Here is the GitHub page: 
https://github.com/MuriloMir/arsd_multimedia_tutorial


Re: Help me decide D or C

2019-08-01 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-08-01 at 14:49 +, 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 languages like 
> Clojure, Scala, Ocaml, and F#.
[…]

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.

I am not sure about F# (I do not know anything of it), but 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.

-- 
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



signature.asc
Description: This is a digitally signed message part


Re: Help me decide D or C

2019-08-01 Thread Aurélien Plazzotta via Digitalmars-d-learn

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.




Re: Help me decide D or C

2019-08-01 Thread Alexandre via Digitalmars-d-learn

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
- C#:
web, graphics, mobiles, command tools with nice language.
- Java/Kotlin:
same as C# but in top-3. C# is top-5 with more comfort 
language than Java. Kotlin same comfort as C#, but JVM (Virtual 
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.


Re: Help me decide D or C

2019-08-01 Thread a11e99z via Digitalmars-d-learn

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
- C#:
web, graphics, mobiles, command tools with nice language.
- Java/Kotlin:
same as C# but in top-3. C# is top-5 with more comfort 
language than Java. Kotlin same comfort as C#, but JVM (Virtual 
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 :)


Re: Help me decide D or C

2019-08-01 Thread a11e99z via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-08-01 Thread bachmeier via Digitalmars-d-learn

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 
Clojure, Scala, Ocaml, and F#.


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.


Re: Help me decide D or C

2019-08-01 Thread bachmeier via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-08-01 Thread matheus via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-08-01 Thread JN via Digitalmars-d-learn

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"


Re: Help me decide D or C

2019-08-01 Thread Kagamin via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-07-31 Thread Bert via Digitalmars-d-learn

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.




Re: Help me decide D or C

2019-07-31 Thread rikki cattermole via Digitalmars-d-learn
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


Re: Help me decide D or C

2019-07-31 Thread SashaGreat via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-07-31 Thread bachmeier via Digitalmars-d-learn

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.




Re: Help me decide D or C

2019-07-31 Thread SashaGreat via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-07-31 Thread Alexandre via Digitalmars-d-learn

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.





Re: Help me decide D or C

2019-07-31 Thread Alexandre via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-07-31 Thread bachmeier via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-07-31 Thread matheus via Digitalmars-d-learn

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.


Re: Help me decide D or C

2019-07-31 Thread Ali Çehreli via Digitalmars-d-learn

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.





Re: Help me decide D or C

2019-07-31 Thread Paul Backus via Digitalmars-d-learn

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


Re: Help me decide D or C

2019-07-31 Thread Andre Pany via Digitalmars-d-learn

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