[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How should learning to program in c++ be approached, if learning objectives are sought to be customised?



Hello!

A wonderfully informative email indeed. It entices me to more specific
questions.

I would like to partially quote you to maintain a context for my reply.

You said, "... C++ would be much easier to learn once you understand C ..."
I learnt c, but didn't like it, as I didn't find a list of specific
modules (or reusable example code-snippets) to achieve an objective.
The header files are very, very complex and they can't be understood.
The header files use machine language and push those obscure portions
into tiny little black boxes, under the carpet, away from our sight. I
used cscope to read the header files and understand them, but in vain.
To me, c appears as a hodge podge of low level and high level
programming languages. Not a complete programming language in itself.
c language appears to encourage a complex ecosystem of numerous
programmers coming from diverse fields, all working as individual
parts of a very complex machinery.
But c ecosystem appears to discourage a complete programmer who has a
complete idea of the entire machinery and its individual components. A
slight imbalance in super-specialisation could bring down an entire
system.

I was really excited by the scope provided by Java. It appeared so
easy to me that I could easily build a functional program, to aid
memorising alphabets abcd... in the reverse, "which alphabet came
before which alphabet" using a random function, in a graphical
environment.

I had read that Java could be used to build an entire Operating System
up by itself. In essence, therefore, device drivers as well.
Unfortunately, that project of building an OS in Java was dropped long
back. Java isn't used for building device drivers for the industry, so
far as I have gathered.

Regarding my note, "...  had a programming language been developed
that could address both the lowest microprocessor(machine)-level to
the most advanced user level programming, reading, comprehension and
application  ...", you said, "... Python should be your choice! ..."
Is it supposed to mean that theoretically, an entire OS could be built
up from scratch using Python? Including device drivers?
You said, "... there is even MicroPython for microcontrollers ...". So
according to your comment, python should be able to build a device
driver as well as an OS. And there already exist such implementations.

I was trying to find out if c++ could be used to build device drivers.
You said, "... Linux drivers are written in C, but technically you can
mix languages: use C++ and link it against C ...". But I would request
more specificity here:    (a)  if c++ could be used without using any
other programming language to build a device driver. (b)  If it is
practised industrially.

I often wonder aloud why c wasn't re-built to have the modularity and
OOP structure of Java. It would definitely have helped. Yes, I know
that the demand wasn't there, when programmers thought that 1024KB
would address all problems of the world.

But a language could be re-built to incorporate every programming
need. Then aided by a huge library of code snippets, functions,
objects, etc., like Oracle Java repository. But to reach the lowest
level possible.

I began learning python, but I am not sure if python could be used in
place of Assembly (or machine) Language, addressing programming needs
from the lowest to the highest level. Perhaps your notes answer my
doubts. Would like to know more.

For example, like Deepmind's Alpha Code AI, writing codes as per
requirements, research is getting there.
So I would like to develop an understanding of programming from the
lowest level to the highest level. The way programming is approached
in textbooks doesn't suit me. I can't have the flexibility to use
programming like a cobweb or a network, jumping from lowest level to
the highest level according to my need.

I read that micropython is written in c. So it is just like
circumlocuting to the same point from where it began.

So confusing!

Hope that some confusions shall be set aside in your subsequent posts.

You also said, "... debian-gcc maintainers maintain the gcc package
for Debian, they are not responsible for teaching people C or C++ ..."

I didn't expect them to teach, but only to share their insights and
information. In contrast, the debian-python group readily shared
information with me on python.

Best wishes,
Rajib




    To: debian-user <debian-user@lists.debian.org>
    Subject: Re: How should learning to program in c++ be approached,
if learning objectives are sought to be customised?
    From: IL Ka <kazakevichilya@gmail.com>
    Date: Mon, 30 May 2022 16:34:33 +0300
    Message-id: <[🔎]
[🔎] CAHv=rM2yKzDJOzJsqpc7GVJMdRy1o6-xrANXVCdGw_Cqt--oiQ@mail.gmail.com>
    In-reply-to: <[🔎]
[🔎] CAEG4cZWmOT23cVnBG_RrAG0GbwCiOT-uP2V117tZg+kNF2ca9w@mail.gmail.com>
    References: <[🔎]
[🔎] CAEG4cZWmOT23cVnBG_RrAG0GbwCiOT-uP2V117tZg+kNF2ca9w@mail.gmail.com>

Hello,
 [   ...   snip   ...   ]


Reply to: