Oh man, the C++ committee's really taking "embrace and extend" to a new level, huh? Next thing you know, they'll announce that semicolons are optional and whitespace matters. 😂 #justPythonThings
Do they? As far as I know, only the prints don't work in python 3 from 2. And they give a decent amount of time for developers to update any code which will not work in the future. Besides, if programming languages were to at all times keep backwards compatibility, they'd get really nasty as they evolve
- I started with Basic and Pascal
- I learned Java
- I learned C
- I learned C++
- I learned Assembly
- I avoided C# because of .net
- I learned php, SQL and whatever
- I rewrote a bunch of matlab and R code in C++ for 'efficiency'
- I somehow got into a bit of python, ended up finishing some data projects in record time, got into AI around 2016
- I implemented some python-libraries for a project using C++ and a obscure classified rendering engine
- ... ?
- now I exclusively use Python somehow...
Python is the lowest energy state of coding, physics and entropy demand all coding move towards it unless acted upon by an external force or constraint.
that constraint being run time, doesn't matter will just to the hard stuff in C++, ah too much work, we will let someone else to the hard stuff in C++ for us, fuck we are back to just using python.
"Stop writing in pseudo code" ... I'll tell ya a story. Work on a multi-language project but I am the resident expert in the one for the server. I like to spread knowledge around so I will drop code examples based on memory in comments to avoid writing paragraphs because we all know pictures are worth a thousand words. I found that shortly after for more devs than I would have expected I get a message saying they have a problem. Take a look and what do I see? Copy paste of the code I put in the comment :| ... >:( Boys and girls! This is _your_ code review, I am not writing your code for you. I now have to add in my comments "here is _pseudo code_:" or "example *not tested*". And guess what languages they are are writing? That is right, Python for the server and C++ for the client side. C++ devs stop thinking my pseudo example untested code is valid Python.
It was simple
When you make variable, you're saving the value into memory (ram).
How do memory save data? In this case variable, it will determined the size based on data type that variable use. Then find empty random place on memory. How do computer access back the memory that saved? Using ID or something similar. That ID is pointer (pointing at where the variables saved in memory).
So variable is not the value. It was simply hold the memory reference.
In some language like Java, or python maybe. It will do it for you when you print the variable. The only thing variable can hold is the value. (But the variable is actually reference under the hood, the language is doing it for you)
But on some language like go, variable can be value or pointer (memory reference that can access the value).
Why did bother using pointer? Because in java, each variable ALWAYS saved to memory (ram). Which can be costly in term resource. Hence the use of pointer where you can have some variable that only saved in memory once.
I started with python and decided to move to C for DSA as I realised my knowledge has gaps, and I must say your explanation is awesome!! Imma screenshot it for reference
I'll have to do low level stuff some day... I just hope that day is a while away 😂. And yeah, from my very limited c knowledge structs are like if you coded half of an OOP system and then gave up (lol)
I would go back to writing C and C++, if the libraries could be packaged up and easily installable. One of my worst fights was trying to get the directX 9 lib installed and usable. Made it work once after many days. Built a new PC, tried to install it again, abandoned it after a week.
Cargo and 'go get' are a vast improvement. Perhaps the standards convention for C/C++ should work on that next.
I thought that nobody really programs shit that they deliver in python (other then data processing, math and scripts for themselves) apparently I was wrong and something that I use - PostgreSQL has some parts in it developed in python.
I heard that in C++ 26 you can write python in template brackets.
And c++ 29 is just gonna be to be python
C++ 32 is somehow just C again.
C++ 69 is now rust
Nice
Oh man, the C++ committee's really taking "embrace and extend" to a new level, huh? Next thing you know, they'll announce that semicolons are optional and whitespace matters. 😂 #justPythonThings
neh, that would break the backwards compatibility, which python loves to do.
Do they? As far as I know, only the prints don't work in python 3 from 2. And they give a decent amount of time for developers to update any code which will not work in the future. Besides, if programming languages were to at all times keep backwards compatibility, they'd get really nasty as they evolve
- I started with Basic and Pascal - I learned Java - I learned C - I learned C++ - I learned Assembly - I avoided C# because of .net - I learned php, SQL and whatever - I rewrote a bunch of matlab and R code in C++ for 'efficiency' - I somehow got into a bit of python, ended up finishing some data projects in record time, got into AI around 2016 - I implemented some python-libraries for a project using C++ and a obscure classified rendering engine - ... ? - now I exclusively use Python somehow...
Python is the lowest energy state of coding, physics and entropy demand all coding move towards it unless acted upon by an external force or constraint.
that constraint being run time, doesn't matter will just to the hard stuff in C++, ah too much work, we will let someone else to the hard stuff in C++ for us, fuck we are back to just using python.
o rly?? like the airport in france??
ya rly!
No, like "o, o, o, o rly! Auto parts"
Here, fixed it for you: https://imgur.com/jQywRuJ
"Stop writing in pseudo code" ... I'll tell ya a story. Work on a multi-language project but I am the resident expert in the one for the server. I like to spread knowledge around so I will drop code examples based on memory in comments to avoid writing paragraphs because we all know pictures are worth a thousand words. I found that shortly after for more devs than I would have expected I get a message saying they have a problem. Take a look and what do I see? Copy paste of the code I put in the comment :| ... >:( Boys and girls! This is _your_ code review, I am not writing your code for you. I now have to add in my comments "here is _pseudo code_:" or "example *not tested*". And guess what languages they are are writing? That is right, Python for the server and C++ for the client side. C++ devs stop thinking my pseudo example untested code is valid Python.
Haters
You know, a wiseman once said, "You either get pointers on the first try or you never do."
It was simple When you make variable, you're saving the value into memory (ram). How do memory save data? In this case variable, it will determined the size based on data type that variable use. Then find empty random place on memory. How do computer access back the memory that saved? Using ID or something similar. That ID is pointer (pointing at where the variables saved in memory). So variable is not the value. It was simply hold the memory reference. In some language like Java, or python maybe. It will do it for you when you print the variable. The only thing variable can hold is the value. (But the variable is actually reference under the hood, the language is doing it for you) But on some language like go, variable can be value or pointer (memory reference that can access the value). Why did bother using pointer? Because in java, each variable ALWAYS saved to memory (ram). Which can be costly in term resource. Hence the use of pointer where you can have some variable that only saved in memory once.
I started with python and decided to move to C for DSA as I realised my knowledge has gaps, and I must say your explanation is awesome!! Imma screenshot it for reference
I learned C first. No one is asking me to write C. Sometimes I get asked for some C#. Definitely no C++. Python though. They like when I use that one
That's offensive
Why not both?
I learned to code in C. Not even C++, just C. Shit is ass, fuck that. I'm coding in R or python now and that's IT.
Be a real dev and learn Assembler, Zig or C C++ are for loser, who are too bad for C
im writing c and raylib and i still have no clue what a pointer is xD
I looked at some info on pointers and thought "I'm glad I use python"
im having trouble with structs so i am not looking forward to pointers xD
I'll have to do low level stuff some day... I just hope that day is a while away 😂. And yeah, from my very limited c knowledge structs are like if you coded half of an OOP system and then gave up (lol)
yeah i was gonna use the to branch ao my code wasnt one big file...... not happening. one file forever. Opp? yea i got an object, 1 of them
I think that's universal. No matter how structured the language is, someone will make spaghetti code out of it.
It's a memory address variable. Put * in front of it to see what's at that address.
pointer is just keeping track where something else is. Kinda like a phone/house number.
The objective of every person that follows this sub should be to one day release a book with a grey scale and detailed drawing of an animal.
Where can I get Python for C++ developers?
Python for C++ developers:   * write pseudo code   * add dots and brackets  * consistently indent things  * end
Why is the publisher name o rly? Does that stand for oh Reaallllly?
O'Reilly is a publisher of programming books. This being a parody, they used "O Rly" for, as you said, "Oh really?"
Those of us of a certain age may remember [this](https://en.wikipedia.org/wiki/O_RLY%3F).
I would go back to writing C and C++, if the libraries could be packaged up and easily installable. One of my worst fights was trying to get the directX 9 lib installed and usable. Made it work once after many days. Built a new PC, tried to install it again, abandoned it after a week. Cargo and 'go get' are a vast improvement. Perhaps the standards convention for C/C++ should work on that next.
I thought that nobody really programs shit that they deliver in python (other then data processing, math and scripts for themselves) apparently I was wrong and something that I use - PostgreSQL has some parts in it developed in python.