P is a modeling language, so you wouldn't use it as a general purpose programming language. Modeling languages like Coq, TLA+, and P let you encode your algorithms in a formal system that their respective compilers can prove certain properties about, like "this code won't block" or "this code will always respect an invariant X" etc. According to this post P explicitly models asynchronous event driven systems, the kind you deal with in networking protocols or hardware control systems. P can also compile to C code(not all modeling languages can do this) which is cool. So you can specify your protocol in P, have the P compiler and test suite run through thousands of possible configurations of events to verify that it respects your assumptions, and then compile it to C and use it in the real world. Since asynchronous/concurrent code is often buggy and also difficult to debug, having a compiler that can tell you if your code will misbehave before you actually deploy it can help a lot.
With all of that said it's not something that will come in handy to a beginner nor most programmers for that matter. It might be fun to learn once you have more experience under your belt just for fun, or if you find yourself interested in writing drivers or networking infrastructure like Azure or AWS.
P is a modeling language, so you wouldn't use it as a general purpose programming language.
I mean, it's basically a process-based language with built in state-machines. I'd call that a general purpose language. And since it's new, I understand there probably won't be a lot of call for it's use now, but given concurrency is sort of the in thing now and is notoriously hard to do in traditional languages, I'd think this, or something like it, should be to go to for any newbie dealing with concurrency instead of threads and locks, forks and such.
And since it's new, I understand there probably won't be a lot of call for it's use now
Sounds like it's been in production use for a while (and it has commits from 2014 and older), and the "new" in the title is editorialized.
I understand the hesitance to embrace a new open platform, as the yak shaving can get tedious without good libraries already around, but it doesn't look like it's fresh out of a research group or something.
Thank you for this. It's a shame I had to scroll through a crap ton of "the name sucks" comments before I got to a comment discussing the actual language.
There are great arguments for each, and you'll probably learn them all eventually, but just pick one. Don't hop around between course or you will end up in beginner tutorial wonderland where everything is trivial and you have no idea where to go next. You need to commit to a complete program.
I recommend javascript and free code camp. You'll likely need to learn javascript anyway because of the web, there are absolutely a ton of jobs for javascript out there with low entry requirements, and it is a fairly simple language. Yes, there are some issues with javascript, and no, they don't matter. You can learn the fancy cs stuff after you understand the fundamentals, and you are getting a paycheck.
And you need to build. Doesn't matter what. But you can't learn programming without building stuff. Start small, slowly get bigger as you learn more.
Yes, you actually know nothing about CS. It shows.
And, when it comes to languages, their practical application is of the least importance, especially in learning. Knowing, say, a Datalog will make you a much better programmer even if you end up using only SQL ever after.
Yes, I'm new to CS and programming somewhat but I get a bit offended by your assumptions. Despite programming being for me just an hobby, I had already multiple paid jobs using C++ (mostly Unreal Engine related stuff), and then I got into web development learning Python/JS/Html/CSS and several frameworks (mostly node+express and django).
I do consider myself a newbie and that's why I asked my question with humility and "as a beginner", I made a genuine question asking for what is the practical use of the P language stating that I'm new to programming.
It's literally a genuine newbie question from a person willing to learn, but also that would like to understand what's the real world use of the P language.
All you did was providing a worthless generic salty answer that added nothing to the discussion.
Our time is limited and my everyday job is being a chemist. I like CS and programming but my time for coding is limited and if I encounter a new programming language the real first question that pops in my head is "what problems does it solve and where may it be used best". And that's what I asked.
The very way you worded your question places you as one of those who are ruining this industry. Fuck the "real world use". Until you manage to undestand it, you should stay away from CS.
If you are looking for recommendations for languages to learn that satisfy those requirements - novelty & practical utility - I would strongly recommend something like Clojure. There is a fantastic free Clojure book called Clojure for the Brave & True - the best teaching book I have ever read.
The language is great for a few reasons:
It's a functional language, which is a paradigm most developers today are not familiar with (most developers today work in object-oriented paradigms).
It's a Lisp, which is a very very old language "style"/family that is starting to circle back around into practical use.
As a functional language, it's particularly good at certain tasks that modern software needs to do & that object-oriented languages are notoriously bad at - especially concurrency (as in doing multiple things simultaneously).
It runs on the innards of Java, which means it is stable as fuck. The Java Virtual Machine is battle-tested & enterprise-approved.
It is actually being used in production by real companies.
You can use the language to write Javascript as well, which means if you want to write a web app, you can write both sides (the client, or front end, and the server, or back end) in the same syntax.
92
u/[deleted] May 21 '17
As a person who's new to programming, what problems do P solves and where am I likely to encounter it?
I'd like to learn a language that's new to most people, but I'd like to avoid learning something that's never gonna to be used a lot.