I propose a new programming language, CPC
2 comments
Sounds cool. Do you have any requirements other than what you outlined above such as any grammar examples? Reading this brought me back to my compiler days at uni. We used Oberon and had to create a compiler. It was quite the process! I remember abstract syntax trees that held the program and as we proceeded through the compilation steps that ast was passed around and inspected for all steps. This I found helpful: https://dev.to/villyp/how-to-build-a-compiler-a-step-by-step...
This sounds a lot like late 70's / early 80's Rapid Prototyping, and also what people seemed to think Lisp would eventually turn into at the time.
The purpose is that Google interviewers will not only comprehend your solution, they will see you are fluent in algorithmic thinking.
The idea is simple. Everything is a list. In CPC, a list is defined so that a child - albeit a prodigy - could easily understand: a list is a collection of items, in order, where each item has a position.
Take all the data structures that appear in leetcode, and abstract them away to their most common denominators in terms of lists. In other words, a hash table is a list where each item has a name and a value. Repeat this for every data structure so that there is as little jargon as possible in CPC.
Then the syntax for CPC is just the plain english describing the pseudocode. The code supports “wobble”. In other words, you can use plain english to describe a solution in more than one way.
Any thoughts? If there are supporters here, I propose we as a community proceed to derive CPC solutions to popular leetcode problems. Once we hit the 500 problem mark, we can publish CPC as an official compilable language.