# Programming Language



## Munzy (Jan 3, 2015)

I have gotten pretty good at php, but it is time for a change. I want to concentrate on a new, more modern, and functional language, but I do not know which to choose from. I want the code to be of some value to the future. What I mean by this is that I want something that is going to be used commonly throughout the future like php. I commonly build web applications so I would like it to support http in some way, either by a cgi script or something else. What would you suggest considering this all? 

I have also seen a lot of things about go recently, is it worth the invested time and effort and will it do as I wish for now and the future?

Thank you for your input.


----------



## RTGHM (Jan 3, 2015)

So, because you stated PHP, I'm assuming you want more web-application focused languages or?

Could you be specific on what you intend on doing? For example if you want to develop games well... C++/C

If you want to develop websites well:

PHP, nodejs, etc.


----------



## texteditor (Jan 3, 2015)

Java


----------



## Munzy (Jan 3, 2015)

Web application focused, but not entirely. I want something that has all around functionality.


----------



## qrwteyrutiyoup (Jan 3, 2015)

How about Go? Or the more popular Python or Ruby?


----------



## Kalam (Jan 3, 2015)

You could pick a PHP framework like Laravel to learn. Other than that I'd say probably Python.


----------



## DomainBop (Jan 3, 2015)

language: http://www.scala-lang.org/

framework: http://liftweb.net/


----------



## drov (Jan 3, 2015)

Node


----------



## HalfEatenPie (Jan 3, 2015)

Python.

Has applicability on the web and native software.


----------



## trewq (Jan 3, 2015)

Python. It can be so useful for client and server side stuff.


----------



## Aldryic C'boas (Jan 4, 2015)

Perl.


----------



## TruvisT (Jan 4, 2015)

C#

You can go web with ASP.NET or go Windows development. If you want something that will get you into heavy dev go this route. You can always move over to Java very easy and do Android dev. 

After C# go C/C++ then ASM if you like deep level coding.

Otherwise you can branch out to Perl, Python for web app and server scripts.

Javascript might be an option, but it is one of the most dynamic languages now and can become a real adventure over time.


----------



## comXyz (Jan 4, 2015)

Go with the programming language that you love. Whatever PHP or C# will do the job well.


----------



## Munzy (Jan 4, 2015)

comXyz said:


> Go with the programming language that you love. Whatever PHP or C# will do the job well.


I love PHP, but I want to learn something else and thus this thread.


----------



## IntegralHost (Jan 4, 2015)

I would recomment JAVA


----------



## RTGHM (Jan 4, 2015)

Munzy said:


> I love PHP, but I want to learn something else and thus this thread.


Honestly, I think that nodejs would be the best for you then.


----------



## drmike (Jan 4, 2015)

Python.


----------



## Amitz (Jan 4, 2015)

I am learning Python at the moment.


----------



## drmike (Jan 4, 2015)

Amitz said:


> I am learning Python at the moment.


It's on my to learn more about list.  Only have lightly tinkered so far.


----------



## Amitz (Jan 4, 2015)

drmike said:


> It's on my to learn more about list.  Only have lightly tinkered so far.


I am having fun with it up to now...


----------



## Hxxx (Jan 4, 2015)

My advise:

Improve your html5 with Angular.js and use PHP as backend to retrieve json with data.


----------



## wlanboy (Jan 4, 2015)

There are different routes:


.Net environment
All about C# and ASP.NET. Looks similar but you need a new (and pricy) environment: Windows Server, IIS, MSSQL (or Azure) and Visual Studio.
Java environment
Opensource like PHP. Similar language and you can scale from JBoss. JSF and JEE are the starters.
Ruby
Good for webpages, REST services, message driven apps (my homepage is written in Ruby too). The mayor static generators are written in Ruby too: Jekyll, Octopress and Middleman.
Phyton
Same as Ruby. There is one static generator too: Pelican. Well the discussion for Ruby or Phyton is allready 

JavaScript
Don't underestimate the new drive of client side JS. Forget about the node.js hype.
More and more devs and corps cutting server and client side with the help of the MVVM or MVW patterns.
Backends in Java/Ruby/Phyton/PHP and frontends on Angular.js or Backbone.js
It is an eye opener to see how crafted those webapps can look like.
Your PHP code is just for data sending and data receiving. The whole (and nasty) HTML stuff is done with JS.
Databinding, controllers ... basically
A whole new way to look at the way to build patterns:


MVC - Model-View-Controller
MVP - Model-View-Presenter
MVVM - Model-View-ViewModel

MVW / MV* - Model-View-Whatever
I colored the ones that you should look at.
Take one and search for the proper client side framework.


----------



## RobertYank (Aug 14, 2015)

just take a look


----------



## wlanboy (Aug 14, 2015)

RobertYank said:


> just take a look


And a second look:



githut.info - Top Active Languages


----------



## graeme (Sep 3, 2015)

If you want language that is useful in itself: Python. See my comment here: https://vpsboard.com/topic/7387-python-any-interest-in-group-learning/?do=findComment&comment=99913

If you want to stretch your mind: Haskell. I am learning it at the moment. Definitely hard to learn, but you learn a lot. It may not be something you will use, but I think it would make you a better programmer, and it is the most functional language that has any traction (you did mention functional). It is also as different from PHP as you can get (functional and strongly typed)

Scala, Clojure, and F# may be interesting. Erlang is probably too niche (good for extremely high reliability and uptime and scalability). Ocaml looks like its fading away slowly (but some people love it, and it is a gentler transition than Haskell to strongly typed functional languages).


----------



## HN-Matt (Oct 16, 2015)

As someone who hasn't dedicated himself to studying a programming language but can limp around blindly on fools errands in most of them, I am really starting to dislike PHP. Wasted so much time last night searching for a simple workaround to array_combine's refusal to parse 'duplicate' keys (conflating two different arrays into one for the x and y axes on a graph where the keys were unpredictable and may have turned out similar at times). I don't see the absolute need for the key to be 'unique' in a situation where two arrays with unpredictable variables (market data) will merge, just let me combine the god damn key/value pairs!

Kind of hilarious responses here: http://stackoverflow.com/questions/9078770/php-merge-two-arrays-similar-to-array-combine-but-with-duplicate-keys



> *There is absolutely nothing "elegant" in using PHP's built-in functions *and nothing to pursue for.
> 
> This is not a _Haute Couture _show. This is programming.
> As long as you have a solution that is sane, readable and works, you can call it elegant.


----------



## Munzy (Oct 16, 2015)

HN-Matt said:


> As someone who hasn't dedicated himself to studying a programming language but can limp around blindly on fools errands in most of them, I am really starting to dislike PHP. Wasted so much time last night searching for a simple workaround to array_combine's refusal to parse 'duplicate' keys (conflating two different arrays into one for the x and y axes on a graph where the keys were unpredictable and may have turned out similar at times). I don't see the absolute need for the key to be 'unique' in a situation where two arrays with unpredictable variables (market data) will merge, just let me combine the god damn key/value pairs!
> 
> Kind of hilarious responses here: http://stackoverflow.com/questions/9078770/php-merge-two-arrays-similar-to-array-combine-but-with-duplicate-keys
> 
> ...



There are a lot of those in php, but there is also a ton of amazing things you can do with it. Personally I <3 php. I like more verbose syntaxs, unlike python.


----------



## graeme (Oct 26, 2015)

> There are a lot of those in php, but there is also a ton of amazing things you can do with it. Personally I <3 php. I like more verbose syntaxs, unlike python.



Verbose is not good in itself. Overly terse languages can be difficult to read (like APL), but readability is good, and being concise is good if it improves readability. That is why I like Python.

IN this particular case a

As for PHP, this expresses my opinion of it better than I could: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/.


----------



## joepie91 (Oct 26, 2015)

I'd very much recommend Node.js. Very easy to pick up (especially if you already know JS), generally decent documentation all around the ecosystem, package management that doesn't get in your way. Especially when wanting to learn something new (and gain a different perspective to solving problems), JS being half-functional is a very relevant thing. A bit more about that here and here.

Mind the inheritance model - Javascript is object-oriented, but not classically-inherited. There are no classes in JS (just a few things that pretend to be classes, with mixed results). Closures are great, and a lot more intuitive (and useful) than their PHP counterpart. Execution model for web stuff is considerably different - long-running process, rather than CGI-style like PHP does. Useful for many non-web things, though not for CPU-bound tasks, things that require extremely low latency (eg. HFT), or things that require arbitrary precision numbers (scientific, financial, ...).

Package management is a big one - nested local dependencies, so no version conflicts. As a result, you have many modular frameworks and libraries, and not so many monolithic ones. This is a good thing, but may be a little unusual when coming from PHP. Generally, you want to be looking for small modules that do one thing only, and just string them together. Definitely use promises.

Avoid MongoDB, though. It's unfortunately picked up a lot of traction in the Node.js community, but it's utter crap. Similar for Meteor, which relies on MongoDB, and Sails.

Plenty to learn, either way


----------



## HN-Matt (Oct 26, 2015)

VB6 4life


----------



## flopv (Oct 31, 2015)

You are good in PHP. You could learn any CMS like Wordpress, Joomla, Magneto. You can speed up your rate of development by using these CMS. Learn any MVC framework like CakePHP. Frameworks are used in managing big projects.


If you want to learn more, you could learn J2EE. Some topic of J2EE are Core Java, JSP, Servlets, Java Beans. Some framework designed in JAVA are:


1. Struts 2 - Front end development.


2. Spring - Remove dependencies injection ( Removing the new operator for making objects)


3. Hibernate - IT manages your database using objects.


----------



## risharde (Dec 2, 2015)

At university, they taught java and at the time, I was like... java?? Why java??? Ughhhh. In best case scenario, I would have chosen c++. Nevertheless, java is used for web apps... or you could make your own http server altogether. But you aren't limited there. You can code for android apps and even for other java enabled devices which are out there. Down to certain blu ray supports java. Its also 'supported' on a wide range of operating systems from windows to linux etc so you can easily port or not even have to port your programs.


----------



## joepie91 (Dec 2, 2015)

risharde said:


> At university, they taught java and at the time, I was like... java?? Why java??? Ughhhh. In best case scenario, I would have chosen c++. Nevertheless, java is used for web apps... or you could make your own http server altogether. But you aren't limited there. You can code for android apps and even for other java enabled devices which are out there. Down to certain blu ray supports java. Its also 'supported' on a wide range of operating systems from windows to linux etc so you can easily port or not even have to port your programs.



You don't need Java for any of those things, except for perhaps Blu-ray.


----------



## risharde (Dec 3, 2015)

joepie91 said:


> You don't need Java for any of those things, except for perhaps Blu-ray.



Please elaborate... I code android apps in java so I am wondering what you mean


----------



## ricardo (Dec 4, 2015)

Go with C. Write a few simple programs and compare its performance to other languages. You'll learn to hate everything else.  On a more practical level, it's good to have a grip of it before trying C++ no doubt.


Go for lower level if you're after deeper understanding, higher level if you're looking to monetise your learning, IMO. It seems all the cool kids use nodeJS nowadays, if you wish to script.


----------



## joepie91 (Dec 4, 2015)

risharde said:


> Please elaborate... I code android apps in java so I am wondering what you mean



Nearly every modern language works cross-platform, many of them out of the box. Qt is a cross-platform solution for building graphical interfaces that has bindings for just about every language.


There are JS runtimes for mobile platforms as well - Cordova and PhoneGap come to mind. There's also TideKit, but they're evil. I've also seen some mobile runtimes for other languages in the past (eg. Python), but can't recall where to find them.


Building web application servers can be done in many modern languages, almost every one of them in a simpler manner than Java. Think Node.js, Go, Python, Ruby, and so on.


Games in C/C++/C# almost consistently perform better than their Java counterparts, with significantly lower system requirements. "Cross-platform" is a farce there, anyway - even if you didn't have to think about the OS you're going to be running on, you're still going to have to dig deep into GPU-specific implementations of OpenGL (as well as proprietary APIs) to reach anything near acceptable performance.


The idea of "Java-enabled devices" is more or less a pipedream nowadays. (Non-Android) Java phones are almost dead, IoT products generally run C or PHP, and the only "Java-enabled device" that most people will own nowadays is a Blu-ray player.


Frankly, the era of Java is over. And it just doesn't have any reason to make a comeback. The only reasons it's still in wide use, are that 1) it remains part of school curriculums, and 2) there is a large amount of legacy code running on it.


----------



## sterile (Dec 8, 2015)

I would say python, but my lack of experience doesn't support that my answer is the best.


----------



## willie (Dec 8, 2015)

kivy.org is a cross-platform Python gui toolkit that works on the main desktop and mobile platforms.


----------



## graeme (Dec 31, 2015)

Java is two different things:

1) Java the language. I do not like it much, personally
2) The platform: the JVM and the libraries.

There are a *lot* of JVM languages other than Java, some are JVM specific (Scala, Clojure, Ceylon...) while some are JVM implementations of languages that are well known for their non-JVM implementations (there are JVM implementations of almost every language we have discussed so far).

Other JVM languages give you access to Java's huge libraries and many be deployed just as though they were Java.



joepie91 said:


> Frankly, the era of Java is over. And it just doesn't have any reason to make a comeback. The only reasons it's still in wide use, are that 1) it remains part of school curriculums, and 2) there is a large amount of legacy code running on it.




Java is mostly absent on consumer devices, but it is widely used on servers. The new JVM languages are a very good reason to use it as, unlike most new languages, they have huge libraries. Look at things like Hadoop, Spark, Cassandra, Lucene (Solr and Elasticsearch and others) - those are major applications in growth areas.


----------



## wlanboy (Jan 2, 2016)

graeme said:


> Java is mostly absent on consumer devices, but it is widely used on servers. The new JVM languages are a very good reason to use it as, unlike most new languages, they have huge libraries. Look at things like Hadoop, Spark, Cassandra, Lucene (Solr and Elasticsearch and others) - those are major applications in growth areas.



Don't forget Android.


----------



## graeme (Jan 3, 2016)

wlanboy said:


> Don't forget Android.



Good point! I was so focused on non Java languages on the JVM that I forgot that you can run the Java language on platforms other than the JVM (well, one anyway).


Incidentally, you can run a number of languages (including some that also run on the JVM) on the Android Dalvik VM. So if you run one of those on Dalvik you have incrementally replaced all of Java for your own code but can still call Androids Java APIs natively.


----------



## wlanboy (Jan 3, 2016)

graeme said:


> Good point! I was so focused on non Java languages on the JVM that I forgot that you can run the Java language on platforms other than the JVM (well, one anyway).



Yup. There are some VMs you won't expect:


HaikuVM: Atmel AVRs (Arduino)

IKVM: Java for Mono 

JC: Java bytecode to C

Mika VM: Embedded devices


----------



## graeme (Jan 3, 2016)

Those are JVM implementations, not an alternative VM that runs Java - i.e. unlike Dalvik they run Java bytecode.

Interesting nonetheless: I had not heard of HaikuVM or Mika, as I am woefully ignorant about embedded stuff.


----------



## HN-Matt (Jan 10, 2016)

Question from a disheartened PHP lifer, are there programming languages out there that don't limit the context to variants of 'echo' and 'print'?


----------



## graeme (Jan 10, 2016)

@HN-Matt


I am not sure I understand the problem, but I am pretty sure the answer is yes.


----------



## wlanboy (Jan 10, 2016)

HN-Matt said:


> Question from a disheartened PHP lifer, are there programming languages out there that don't limit the context to variants of 'echo' and 'print'?



Ruby


----------



## UltratechHost (Feb 18, 2016)

PHP and Python is best


----------



## Jack134 (Jun 5, 2022)

I would be going with - Java and Php.


----------



## greenwebpage (Jun 12, 2022)

JAVA AND PYTHON is the best


----------

