Am 17.10.2014 um 16:14 schrieb Jessica Rauth:
On Friday, 17 October 2014 at 08:44:00 UTC, Paulo Pinto wrote:
On Friday, 17 October 2014 at 01:05:37 UTC, ketmar via
Digitalmars-d-learn wrote:
On Fri, 17 Oct 2014 00:52:14 +0000
MachineCode via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
wrote:
I don't understand. If at least it were C but java? why not D itself?
C is *awful* as "beginner's language". never ever let people start with
C if you don't hate 'em.
as for D... current version of D can be used, but with some
precautions. we now have excellent book by Ali. (it's great, really! i
believe that it must be featured on the front dlang.org page!) but java
has alot more books and tutorials.
not that D is bad for beginners, it's just has a smaller userbase. and
all that things with "classes are reference types and structs are not",
"empty array is not empty array but is empty array" and so on D may be
confusing a little. it's good to have some CS background to understood
that things.
just my cent and cent.
Better, go with FreePascal http://www.freepascal.org/ and discover all
that those features that many C advocates spread as being close to the
machine and other C only features, aren't exclusive of it.
Alongside support for real modules, OO and genericity.
Then with a head clean of bad C influences, jump into D.
--
Paulo
One of the problem when starting out with FPC resides in the fact that's
a completely different family of language (Ada, Pascal, Modula vs the C
family), syntax and philosophy (for example in the RTL).
Another one is that usually people use it in combination with Lazarus
and as the RAD concept is no shit, people start building some
applications very fastly. Then when they come to another lang. eg D or
Cpp they take a big slap in the face. The fact is that Obj. Pascal and
Delphi often give a wrong appreciation of its own skills and abilities.
Although I am biased to the Pascal family of languages, this has been
done in real world for a couple of decades.
When I joined the New University of Lisbon as a student in 1994, I was
lucky that the professor heading the programming languages section, had
a similar opinion as me in terms of programming languages.
The first year students had introduction to programming with P2C/GNU
Pascal in the first semester, followed by C++ with gcc in the second
semester.
There was no C, at all. It was expected that any student compent enough
to use C++, would be able to code in straight C if asked to do so.
On my last year at the university (1998/9), I one of the teachers giving
those lab classes to students. By then, we were using Delphi and Visual
C++ instead.
The students didn't had much problems switching languages.
They got to learn that using pointers doesn't need to be the dragon that
C makes out to be.
That there was a way to deal with strings, arrays and reference
parameters without impact in the whole application. The most curious got
to learn how to disable bounds checking.
They learned how to write modular applications without having to prefix
all their identifiers.
They also learned that C wasn't the only way to touch the machine at all
levels.
You talk about genericity but the genericity in Object Pascal is
currently almost inexistant and doesn't provide a good idea of what
"template-meta-programming" is. Actually this looks more like a patch to
the lang. and some simple things just like casting a generic type or
global generic functions simply don't work at all. While D2 has been
written with this idea, FPC will never be good with TMP. Even in the
commercial version (Delphi XE7) they start to add some kind of patchs eg
with a compiler instrasic which is equivalent to D "static if" (which
means that the lang. is not designed for that at all).
I just referenced it, because I saw it mentioned a few times in Delphi
documentation, but never came to use it.
Since 2000 that I don't do anything in the Pascal world of languages,
besides collecting Oberon related stuff.
--
Paulo