by deltasevennine · 4y ago · 0 comments
The OP isn't talking about this. The OP is saying at a basic level python/typescript is simply C++ with no pointers.
So the OP is asking can't we design a python-like language with pointers?
>For some personal opinion, I don't consider C & C++ complex languages. They're easy.
This is not an opinion shared by many. It's like someone saying they enjoy licking the ground. C++ is known for it's over complexity. It is complex mostly not because it's low level but because it's carrying around decades of design baggage and poor design decisions while being modern and backwards compatible.
>Otherwise it just goes bang, and it's a good thing in most cases.
Hard disagree. Low level programs can go bang at locations far away from the error and become incredibly hard to find. Additionally memory leaks are really challenging to find sometimes. These errors happen despite programmers knowing what they are doing as they are "mistakes" or bugs. These problems happen much less in higher level languages. C++ and C go bang at all the wrong times, while something like unsafe python goes bang at all the right times.
Apologies. What does this have to do with what I'm talking about? Not sure I said anything about memory leaks not happening in languages like python. I believe I said these issues happen "much less" in higher level languages so I'm not sure what you're trying to clarify here.
Memory leaks happen very frequently in managed languages e.g., http://ithare.com/java-vs-c-trading-ub-for-semantic-memory-l...
I would say your very inexperienced then. "Much less" is very obvious. Simply forgetting a delete operator or free in manual allocation leads to a memory leak.
It is also proveable. Error surface area is smaller. delete and free don't exist in languages that exclusively use the GC for freeing memory thus you cannot "forget" to use those functions and thus error surface area is smaller, thus it must happen less frequently.
>Memory leaks happen very frequently in managed languages e.g., http://ithare.com/java-vs-c-trading-ub-for-semantic-memory-l...
It happens but not frequently at all. I'm sorry. If you did manual memory management you would know this.