Python vs C: Line comparing codes against Dev time

Hi, I'm currently learning Python, as the syntax seems so concise, and idioms go well with my mental model.

However, I am also interested in learning about the internal functions of the OS and reverse engineering software, which ultimately means knowing C to the fullest extent.

When I initially chose the language, I read and compared a lot, and it seems that the number thrown out a lot is that writing short idiomatic operators in Python would require the equivalent of several hundred lines of C (I would have code for memory management, writing code for dictionaries, lists, etc.), which we take for granted as being built into the Python language.

1) With the average C programmer, is this 100-200 lines of code for the Python idiom somewhere close to the exact one?

Since C is not built into Python-like constructs like dictionaries / lists (with all their good methods, etc.):

2). With C programmers, tend to build these constructs from scratch and then reuse them between projects to significantly reduce the actual amount of manual coding for their projects?

I assume that I am using libraries like boost :: stuff again, also reduces some hand encodings using templates ...

3) But does it use popular libraries and reuse regular code that was previously written in C for basic constructs / etc, how much it revises lines of code written in C, compared to code in Python on the size of an enthusiast code base ?

, , , .. C, Python, Linus Torvalds?

!

+3
6

Boost - ++, C ( C). , C).

, C "" - , , .. : , , ..

- - , , C , . OTOH, , ( ) C .

, Python , , ( ).

+6

.. C, Python

.

.

Python. edit-compile-link-execute-break-debug. -.

+9
  • , , , . ( C, )

  • .

  • , , , detectFace( faceDesriptor ) renderPDF( document), , . , , .

+1

, Python ( ).

, C ( IMHO , Ada): , , .

C , Python, . , , , C .

+1

.

python. , - , , , , . OS python. , python C.

, python. , . Python - .

, . , python, python.

, python, . , C, Python Python, .

0

. 100: 1 Python- , . , C/++, , , , 3: 1 .

, C/++ , , Python .

0

Source: https://habr.com/ru/post/1764986/


All Articles