# How many different programming languages do you use?



## Preetpal (Jan 27, 2018)

The total can include programming languages that you only use once in a while.


----------



## ralphbsz (Jan 27, 2018)

I counted C and C++ separately, even though today I use the same compiler for both, and I use "//" style comments, and I separate them this way: strictly procedural code is C, while object-oriented code is C++.  And I counted only languages that I've used in the last 5 years, to solve actual problems.  Not looking at older code (I actually looked at a lot of PL/S code a few years ago), not playing with some new language for an evening with no concrete goal in mind.  And I didn't count data description languages (like XML or HTML, or configuration input files), nor lex and yacc.


----------



## ShelLuser (Jan 27, 2018)

This does of course lead up to the question: what counts as a programming language? 

For some Perl is considered a programming language whereas others would refer to it as scripting. Shell scripts face the same dilemma even though some can be seriously complex.

(yes, I know I'm playing the devils advocate here).


----------



## forquare (Jan 27, 2018)

ShelLuser said:


> For some Perl is considered a programming language whereas others would refer to it as scripting. Shell scripts face the same dilemma even though some can be seriously complex.
> 
> (yes, I know I'm playing the devils advocate here).



And going on with that, what about bits of AWK or SED inside said shell scripts?

Personally, I’d say three or four:

Shell (with the aforementioned awk and sed)
Perl
Python
Go
I’ve only just started learning Go, and since I have little purpose to learn it, it’s slow going, but I am finding it quite fun.


----------



## masayoshi (Jan 27, 2018)

Perl6 .....I like it..
It is easy to study it.  ...Rakudo... LOL


----------



## sidetone (Jan 27, 2018)

I want to learn Rust and C at about the same time.

Do Shell and PHP count? Barely enough to do anything. I used to know Basic.
Maybe there should be a question about low level programming languages, and another about scripting languages.


----------



## bookwormep (Jan 28, 2018)

Timing could be important like: ...how many during a lifetime, or how many after Friday night beers and pizza?

The old-timers might remember Assembler, COBOL, and Fortran. Seriously, now just C and Bash script.


----------



## ralphbsz (Jan 28, 2018)

ShelLuser said:


> This does of course lead up to the question: what counts as a programming language?


That's actually a good question.  Is sh (including ksh, csh, bash, ...) a programming language?  It can be: I've seen programs that are tens of thousands of lines long in a single script, with layers and layers of functions, variables, and so on.  On the other hand, someone who types "ls" at the prompt is not writing a program.  And I'm not sure that a 5-line script (perhaps with an if or for statement) is a "program".

The same question applies for example to awk: the awk 1-liners that many people put in their shell script (often just "{print $5}" to print the fifth column) are not really programs.  On the other hand, one can write programs that are complex and hundreds of lines long in awk (been there, done that).

I think to count something as a "programming language one uses", the programs one writes have to have some minimum complexity.  Following Dijkstra's old saying, I would set that limit at the point where the program is complicated enough that it might have a bug (Dijkstra's saying is something like "there are two kinds of programs: those that are so short that they obviously have no bug, and those that are so long that they have no obvious bug.

A related question is whether a purely descriptive language can be considered a programming language.  For example, the file /etc/rc.conf on a FreeBSD system that has lots of stuff installed might be hundreds of lines long.  It represents a heck of a lot of work, and has taken weeks to get every detail right.  Yet, it is not a program, only a collection of settings for other programs.  Similarly, lex and yacc inputs are not programs in themselves (they only tell lex and yacc how to spit out a parser that does the job), but they are complicated, and hard to write.

And about being an old-timer: I've made money programming in RPG-II (not much), and in COBOL (quite a bit).  A few years ago I discovered that there is now a Gnu COBOL compiler, so for fun I installed it, and spend an hour writing a short COBOL program that actually did some useful work for me.  Amazingly enough, with quite a bit of help from the web (I had forgotten much of the syntax), it worked.  And completely obviously, it reminded me what a horrible language COBOL was, and how much better we have it now: the same task could have been done in Python or Perl in 2 minutes.


----------



## Snurg (Jan 28, 2018)

ralphbsz said:


> And completely obviously, it reminded me what a horrible language COBOL was, and how much better we have it now: the same task could have been done in Python or Perl in 2 minutes.


Very good point. 
Depending on the task to be done, different things are more efficiently done in different languages.

For example, think of handling textual data - it would probably usually quite more efficient (in terms of time to write) in, say, Perl than in C[OBOL].
By this perspective, Perl would be a far more sophisticated "language".
But - the Perl "program" would be a mere "script" and no "program"?

So this leads to another question: what distinguishes a "scripting" language from a "programming" language?  *confused*
And this in turn leads to an identity problem:
can one still consider a perl monkey a programmer, or just a scripter, even if the scripts written are complex?

(Anyway, if you wanna laugh, see this post of our admin covering COBOL etc, if you haven't done already.)


----------



## fernandel (Jan 28, 2018)

Looooong time I have to use Clipper on DOS, did learn Pascal when I studied (I am so fart from computers world), and I paly with REXX on OS/2 .
And I use Python (scientific) for work (research).


----------



## SatanBSD (Jan 28, 2018)

I use C, Java, and Python.


----------



## sko (Jan 29, 2018)

If Pearl is considered a programming language (<trigger>it is Turing-complete!</trigger>  ), it would be 3 *programming* languages for me: Perl, C and Assembly (mostly for Atmel AVR and Renesas SuperH).
If *scripting* languages are also taken into account, I'd end up with 5: the 3 above + shell and sed/awk (they are very similar, so I'd count them as one).

Shell, sed/awk and pearl are the ones I use by far the most often in this given order - shell almost every day, sed/awk at least once or twice a week and Pearl if the former won't get the job done. I suppose most sysadmins end up with a rather similar profile?

I'm using C and assembly mostly for "recreational programming" - although I've also written some tools at/for work in C, my primary use is for prototyping on AVR controllers. Mostly this code then gets re-written in AVR assembly. I'm also occasionally doing some reverse-engineering and reprogramming of old Engine ECUs for the Mitsubishi 2l turbo engines with Renesas SH-2/SH7052 chipset, which I have to do in assembly because the only available and properly working decompiler (hex-rays) for this dialect is way too expensive for me...


I also learned and used (Turbo) PASCAL a long time ago, but haven't used it for ~20 years, also tried to learn (MSV)C++ ~20 years ago, but never really liked or used it since (I remember the compiler being horribly slow on my machine back then), so I don't count them here as I won't be able to produce working code off the top of my head.
I also learned (to hate) some rudimentary PHP4 many years ago, but also wouldn't find my way around it easily any more. Markup languages don't count for me as a programming- or even scripting language, so I just omit HTML, XML and the various markup dialects used with *roff macros (e.g. man, mdoc), github-style markup etc I've dealt with over the years...


----------



## Birdy (Jan 30, 2018)

Does the question include the human language(s) used to program one's kids?


----------



## funkygoby (Feb 1, 2018)

3!
Well I touched a lot but master none. I am a musician, not a CS guy.
The one I used the most:
- C made several numerical simulation in college + a personal organizer C/GTK+
- Python when I need a quick program or a script (I don't know shell prog very well)
- Java I hate it but I wrote an OSS/free metronome for android.

I love C because it is concise, yet allow for great things (doing object-oriented with C taught me a lot of thing about memory). I like Python because it provides a lot of abstraction without bloat.
I dislike Java (and  I am afraid of C++) because, there is too much to wrap your head around. I often feel like I am forced to do things in a way for some reason.

I believe the complexity of the toolchain is also responsible for my choices. Doing C++/Qt is voodoo to me. You need the QOBJECT macro (for MOCs ?), don't even touch the makefile. Java brings ant or maven builder or whatever. I am still trying to move my project from ant to gradle. I spent less time learning how to configure a desktop on OpenBSD than I spent on gradle (with no results)

Honorabhles mentions:
shell (I wrote my first decent shell script yesterday: functions, arguments parsing, ~80 lines)
html (i like it) css (what a mess) php (god help me!) but my website is working fine.


----------



## Deleted member 30996 (Feb 1, 2018)

Birdy said:


> Does the question include the human language(s) used to program one's kids?



Behavior Modification and Behavior Management.


----------



## stratacast1 (Feb 8, 2018)

I counted 2 until I remembered I have programmed in PHP, just haven't had a need lately 

1) Python
2) Shell
3) PHP

Starting to learn more advanced Python techniques to improve my code modularity and reusability...but none of my stuff is used for anything really production, just for fun. Or my stuff for work are just some quick Python/shell scripts that are used to automate processes on an as-needed basis


----------



## roddierod (Feb 9, 2018)

I stuck to things I have only used in the last 20 years, the top 6 I use daily/weekly and I didn't count Javascript, HTML or CSS but I uses those weekly monthly. XML I don't consider a language so not included either.

1) C#
2) Python
3) Go
4) T-SQL
5) ANSI SQL
6) csh
7) Delphi - Object Pascal
8) PHP
9) Java
10) Perl
11) C++


----------

