Appropriate programming languages for different problems [closed] - programming-languages

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there a general list of what different programming languages are used to solve different scenarios?
like C is also used in embedded programming,kernel programming,UI programming too(GTK).
C++ is also used for desktop/sever application programming and also business/enterprise applications which sit on the desktop/server or even the web, and also to make computer games
Java is also used for almost anything. same with .Net
Scripting languages are used widely in administrative tasks and web scripting too.
this is my general idea of most languages (excluding functional languages)
can someone correct me and post a precise list of what programming languages can/are used to solve different and most general and common problems across different domains in the IT industry?

These are stereotyped and oversimplified, but:
Assembly and C: embedded programming, OS programming
C++: OS programming, native GUI apps, games
Objective-C: Mac OS programming, iPhone apps
Java and C#: enterprise web services and web apps
PHP: web apps
Ruby/Python/Perl: scripting, web apps
Fortran/Matlab: mathematical and scientific apps
Erlang: high-concurrency network and telecom apps
Scala/F#/Clojure: functional languages, some initial attempts made for business and web apps
COBOL: business apps (yeah, still to this day...)
Prolog: artificial intelligence
Lisp: artificial intelligence (and according to some fans of the language, all of the above)

The best language depends on how you are modeling the solution, as some models just work better with objects, so an OOP would be best, some would best be done in a iterative solution and so on.
So, you either pick a language or you design the solution first, in some language-agnostic solution, such as using some of the UML diagrams.
Either way will create some constraints, and then you do the other part with the constraints imposed by the first one.
You can do basically any problem with any complete language, but some languages are just a better fit, but, again, it depends on the problem solution and how you model the solution.
Any list will be very subjective based on a very important constraint, your familiarity with that language.
But, you will find LISP in robots, for example, as well as in the scripting part of Autocad.
Smalltalk has been used a great deal in the financial industries, from what I have heard.
If speed and size is important then C or C++ is probably the best choice, such as in embedded systems, like dsps.
PHP and Perl, as well as Python have found uses in scripting for sysadmin tasks, but these are also used in many other areas.
You pick a problem and several languages, and I can give a design that will work for that problem, but the solutions will be very different.
It gets more interesting now since we have languages that cross paradigms, so, Java and AOP can solve problems better than just Java by itself. F# and Scala are hybrid languages, so they are both functional and OOP. Javascript can be a functional language, even though it is prototypical by design, but you can pretend to be OOP.

Most languages can cover a wide range of tasks, just with varying degrees of aptitude.
It is the corner cases which define a programming language. To find out which language is specialized for what, you'd have to see each language's website, or wikipedia article.
Scheme for instance, is a dialect of Lisp used in mathematics, because the syntax (and language extensions) are geared towards such use. That doesn't mean it can't do other things, it just means it's really really good at that.

This a somewhat unanswerable question. There is no definitive list of what a language is good for and not good for. Part of this is because language use drives new features in the language, and though some languages have constructs and syntaxes geared towards a certain "perspective" on a problem that does not prevent them from solving other problems.
In addition what defines a language? You listed several but what about SQL, ActionScript, CSS, HTML, etc? Some are not languages but they are used as such and the line is blurring pretty quickly.

Related

Coming from python, what should be the second programming language to learn? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i was thinking learn a more low level language like C, but before it i'd like some opnion about:
what's the second language do you recommend to learn?
learn a low level language will make me a better programmer?
it's really necessary learn a second programming language?
Going backwards:
(3) Absolutely - you'll increase your ability by orders of magnitude by learning multiple languages.
(2) A low level language will make you a better programmer - alternatively a functional language will help as well.
(1) Low-level: go with C. Functional, try Scheme or Haskell. C also gives you the ability to write extension modules to Python if you ever have the need.
what's the second language do you recommend to learn?
Something imperative (i.e. same paradigm) but different. Python is dynamically typed with significant whitespace, so something statically types without significant whitespace: e.g. Java or C#.
These would also make a nice stepping stone towards C. The benefit of C is you really know what's going on, but with the disadvantage that you have to control it all. This level of control is not need for most business problems.
it's really necessary learn a second programming language?
Really subjective, but most good developers know many (consider for a web app: Python, Ruby, C#, Java on the server; SQL on the database and JavaScript on the client; and then the mark-up...).
You benefit from being able to see other approaches to problems and thus create better solutions. So once you have covered more imperative languages move into other paradigms like functional.
I agree with your choice of C, which leads on to C++. If nothing else, learning C will teach you why people these days tend to prefer languages with automatic memory management - but it will potentially also give you a feeling of programming "close to the metal" (without the pain of programming in assembly language), and help you to understand how a processor actually works. Not always useful knowledge but it's nice to know.
Whatever you choose, I recommend a statically-typed language - C, C++, Java, and some functional programming languages fit this bill. Java might be a good choice if you find C a bit tough at first.
I'd say learning any new language makes you a better programmer. However, will learning C make you a better Python programmer? Probably not; why should it?!
Define "necessary"! By a strict definition, no. But you're missing out on the experience of having to think about things in a different way (even if it's only a slightly different way).
I would stay with the same paradigm, but leave options open for another paradigm (functional programming). Probably C# is a good choice, because
If you decide to learn C/C++ later, it'll become a bit easier.
If you decide you want to learn functional programming later, you can switch to F# but still use existing code written in C#, because you stay within .NET framework.
Python is not known to be a remarkably fast language. You should consider learning a language which allows better computational performance. But good old ANSI C is probably too low level, despite you can write very fast programs with it. C# has OK performance for a just-in-time compiled language, and if you need more performance later, you can still extend your knowledge towards F# or C.
Although I don't use Microsoft Windows privately and advertise Linux and Open Source frequently, it's probably a good idea to offer some knowledge about Microsoft technology in case you intent to earn money with programming.

As an EE/CE, what languages/concepts should I become more familiar with before graduating? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am currently entering my senior year as a dual major in Electrical Engineering and Computer Engineering, and have touched on a wide variety of different languages: C, C++, C#/XAML, Java, bash, python, VHDL, assembly, etc. I was wondering what you think would be a good language/few languages to become more proficient in, or to explore for a first time. Also, what level of programming you prefer (hardware, local, network, system, design, integration, and so on) If you could tell me why, I would be grateful, or if you'd like to relate your experiences, I am quite interested
. I am hoping to find a job in hardware design, but as I become better with some languages, I am finding just how much I enjoy programming, so I really have an open mind at this juncture. I would love to hear from some people in the 'real world'.
You want to understand:
Different language paradigms (procedural, oop, functional, parallel, logic [e.g., Prolog], constraint). Do some programming in each.
Different software architectures. OSes, standard applications (MVC, ...)
Software Engineering: requirements, specifation (especially design-by-contract), design, testing. These ideas hold in hardware engineering too.
I would start not by learning a programming language but the fundementals like below 1) computer organisation 2) operating systems theory 3) fundementals of programming (oop and functional) 4) data structures 5) Compiler design and principles 6) dbms concepts
As a budding hardware designer you might want to learn Bluespec. This is a very high-level hardware-description language based on work done at MIT. It's both a language and a company. They have some very impressive results on modularity, predictability, and reuse in hardware design. Check out the page on the Bluespec compiler and find out if you want to pursue it.
I was wondering what you think would be a good language/few languages to become more proficient in, or to explore for a first time?
What do you want to accomplish? You seem to have a good grasp of many popular languages with several typing systems and paradigms. If you want to learn something else new, I would recommend functional programming as it's vastly different from anything you will have encountered before (imagine trying to write a program without an assignment operator eg. =) and becoming more and more useful. Haskell, Scala, and F# are all forerunners of the functional programming pack.
Also, what level of programming you prefer?
It all depends on what you want to do and what skills you want to use. Hardware and system programming will involve more low level stuff (assem, C, C++). The others are less language specific, but involve other skills, like a thorough knowledge of networks and APIs.

How and why are languages formed / Are there any developing languages showing promise? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Question 1: How exactly do modern computer language come into being and why? How do they get their start and who is behind them?
Question 2: If any, what languages currently in their infancy are showing promise?
How exactly do modern computer language come into being and why? How do they get their start and who is behind them?
It's a multistage process:
Pointy-headed type theorists and other professionals are continually proposing new language features. You can read about them in places like the Proceedings of the ACM Symposium on Principles of Programming Languages (POPL), which has been held annually since 1973.
Many of these proposals are actually implemented in some research language; some research languages I personally find promising include Coq and Agda. Haskell is a former research language that made it big. A research language that gets 10 users is often considered a success by its designers. Many research languages never get that far.
From research to deployment I know of two models:
Model A: A talented amateur comes along and synthesizes a whole bunch of existing features, maybe including some new ideas, into a new language. The amateur has talent, charisma, and maybe a killer app. Thus C, Perl, Python, Ruby, and Tcl are born.
Model P: A talented professional make career sacrifices in order to build and promulgate a new language. The professional has talent, a deep knowledge of the field, and maybe a killer app. Thus Haskell, Lua, ML, Pascal, Scala, and Scheme are born.
My definition of a professional is someone who is paid to know about programming languages, to pass on that knowledge, and to develop new knowledge in programming languages. Unfortunately this is not the same as designing and implementing new languages, and it is not the same as making implementations that many people can use. This is why most successful programming languages are designed and built by amateurs, not professionals.
There have been quite a few interesting research languages that have had hundreds or even thousands of users but yet never quite made it big. Of these one of my favorites is probably Icon. I have argued elsewhere that nobody really knows why languages become popular.
Summary: Languages come into being because people want to make programming better, and they have new ideas. Languages get their start when somebody takes a whole bunch of ideas, some new and some proven, and synthesizes them into a coherent whole. It's a big job. The person behind a new language might be a programming-language professional, but historically, most languages that become widely used seem to have been created by talented amateurs.
Answer 2: Fortran 2008 looks very promising.
Come on, bring on the downvotes you humourless Java-teenies, Pythonettes, Rubes and Haskellites !
1) Most development environments these days are built to abstract a lot of low-level/inner workings of an platform to speed up development and cater for new user-interfaces and plaform technologies. There are a both open-source projects and corporates behind these changes... For instance an example would be jQuery is a newish Library that just wraps a lot of javascript making things easier and cross-platform...
Bjarne Stroustrup wrote a book on the history of C++, called "The Design and Evolution of C++".
The genesis of a programming language is always a different story. I'm currently reading "Masterming of programming", which is a series of interview with authors of popular languages. They explain what problems they tackled and how the language was born -- a really cool book.
The TIOBE index can give somehow a trend amongst the programming languages, including the emerging ones. I bet that the future lies in language that will run on top of the JVM or CLR (Notably due to the effort invested in the VMs which are now really great). Concurrency seems to be one of the hot problem of today; so I guess we will see some interesting moves in this area (e.g. Clojure).

Successful Domain-Specific Languages ? Which one do you use? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm interested in Domain Specific Languagess design and implementation.
Much of the DSLs that I know stem from the academic world.
Can you give me some pointers to DSLs that are actually used in the industry ? and that you use on a daily-basis...which are really convenient..
(I'm interested in declarative languages too, but not really xml-based ones...)...
I'd like to establish a (non-exhaustive) list of industry-deployed languages...i know this is huge...
Sometimes, I'm implementing using a General Purpose Language things that could be trivially done using a DSL.
EDIT
I'm mainly interested in application-directed DSLs, not small-embedded languages. For instance, SQL matches what I'm looking for but SQL embedded in java does not interest me.
Another example of the kind of language i'm looking for is X#
A DSL that's so succesful that it got its own SO tag is the regex language. Specific to the domain of string pattern matching, of course.
Another popular one, but with which I have no experience is VHDL. VHDLs popularity stems from the fact that it's easily converted for use in an FPGA.
[edit]
While it's certainly not Turing complete, C's printf() format specifier can be considered as another domain-specific language.
NMake, MSBuild, lex, yacc, bison, flex, TeX, PostScript, XAML, SSIS, Wix
EBNF is probably the most widely-used domain specific language within its domain - a language to describe languages.
Wikipedia suggests that spreadsheet formulas and shell scripts are both domain specific languages. This would make them probably the most wide spread examples.
Awk provides is a domain specific language for the processing of semi structured textual data.
Many of the more powerful unix command line tools in wide spread use such as find and grep could be classed as having a domain specific language (even when limited solely to command line arguments)
I don't know if you want to consider graphical DSLs as well. I'd include
NORMA, a DSL for conceptual domain modeling, based on Object-Role Modeling notation (ORM2)
Web Service Software Factory, which uses three DSLs to model web services
Both of the above were created using the DSL Toolkit.
Here is a question I had asked about DSLs written in Ruby: Ruby DSL (Domain Specific Language) repositories, examples
Aside from Ruby DSLs, SQL is a fine example of a very popular DSL, as is AWK.
MEL (Maya Expression Language) is a command line-esque language that AutoDesk Maya uses throughout its entire design. The Maya Ascii file format that scenes can be saved in uses MEL to compose its scenes. The user interface is largely built and controlled using MEL scripts. The expressions you can use to drive channels and attributes on objects are MEL.
I suppose it could technically be considered an embedded language in cases where you're just writing scripts for it. However, without MEL, Maya basically wouldn't exist. No ascii file format, no user interface, etc.
You can write a domain specific language in languages like Boo, but I think the very definition of domain specific indicates that most of the time it will be in a specific industry or even just a single company...
Wikipedia has a good introductory article on this.
This overview has an examples section with some good links.
There are parts of ruby on rails that can be considered domain-specific languages. In particular its language for specifying relational tables.
Mak Stealth's language for programming charcter behaviors (Do not think it has a name)
Slang - Goldman Sachs language (I've heard of it but never used it)
CMS-2 Navy programming language
Google's web search supports some increasingly sophisticated parametrization
You could argue that this is one of the most widely used DSL's if even a small fraction of their userbase ever uses one of them as opposed to the standard list of words.
Erlang was originally a telecom-specific language, although it is now (occasionally) used as a general-purpose language.
The two (not already mentionned) which have impressed me most are:
OpenSCAD for solid 3D modelling
TaskJuggler for project management (!)
I'm a big fan of declarative DSLs. Operational DSLs (like Maple, Mathematica and R are nice too, but not that different from conventional langauges).
Tcl is a language that was originally designed to be a framework for building DSLs — providing basic functionality like programmability and I/O while the domain-specific parts were created fresh for each application — and which grew up into a generic scripting language. One of the more widely known Tcl-based DSLs is Expect.
For business processes we have e.g.
BPEL which is expressed in XML and is executable
BPMN which is a visual language and is used for modeling

What language to further develop in? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Okay, so far, I have been taking computer science courses in my high school and doing some of my own research on the web, and I have found I really like the subject. However, the computer science courses, having given me a small amount of experience in a few languages (C++, java, and python), leave me wondering where to go for development on my own.
I would like to create desktop applications, or even web applications if I could wrap my head around it. What language would you think would best facilitate this?
As a side-note, what are some good books or online documents that explain general computer science topics? I have found some good ones, but they haven't given me the depth I really want.What are some good ones?
Find an "itch"--a program you wish existed, that would be useful for you to have, but you can't find (or costs money). Then try writing it, using online resources (like Stack Overflow) to help you.
At this stage in your career, language doesn't matter very much. Some languages are better than others at certain tasks, but often your own level of comfort with the language outweighs other issues. So just pick a language you're interested in, and a project you're interested in, and get to work.
You may find that you need to start with a simpler project, or you may find more resources for a different language or framework. But getting started with something--no matter what that something is--is probably the most important thing.
Here is a classic but still quite relevant book if you ever want to level up from coder to software engineer.
Since you're still in high school, I would tell you that time is on your side. You have plenty of time to develop as a computer scientist. Therefore, take the long view for your development. So it's much better for you to understand the abstractions that underly software technology.
In my humble opinion, C++ and Java will always be around and you have plenty of time to develop your skills in that arena. However, a higher level language like Scheme or Python will pay plenty of dividends. You might find this recommendation highly enlightening.
In addition, every application will deal with a database as its system of record. Understanding SQL and data modeling is a win-win.
Also, understanding formal logic and/or discrete mathematics is indispensable for computer science. Computer languages are nothing but formal languages for executing
procedures: i.e. mathematical induction is used to define their syntax and semantics.
It sounds like you would enjoy jumping into a high level, modern language that's native to the operating system you want to target; Objective-C or C# for example. On the other hand if you really want to do something for the web, building a web app isn't much harder (there are just more choices to pick from for the back end and front end technologies you decide to use).
Basically, decide what project you want to work on and choose the best language for it. What really matters is that you're working on something.
What language to further develop in?
Given that you know C++, Java, and Python already, a next language I might suggest would be SQL and DDL: defining databases, and getting data in and out of them.
If your CS course didn't touch on it, I highly advise spending a bit of time with a more functional style of language like erlang, haskell or even lisp.
They won't become your day-to-day hacking language overnight, but can really help you grasp important programming concepts relavent accross all languages.
....especially the one about choosing the right language for the task at hand.

Resources