What are the most important programming languages to know for concepts? [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.
In your opinion, what are the most important languages for a programmer to know? I'm talking about concepts, not about how practical the language is.
List the languages and a reason. For example, Lisp for functional programming, JavaScript for prototype-based OOP, etc.

Must know:
1) C (system programming, understanding of machine architecture)
2) Perl or Python or Ruby (practical day-to-day tasks)
3) Java or C# or C++ (OOP, and quite important to get a job these days)
Really important:
1) Haskell or ML (functional programming; changes the way you think)
2) Lisp or Scheme (power of macros)
Nice additionals:
1) Forth (very low-level, explicit stack operation + joy to write your own interpreter)
2) Assembly languages (know how your CPU works)
3) Erlang (parallel processing)
4) Prolog (logic programming)
5) Smalltalk (true OOP and true interactive developent)

The assembly languages of as many chips as you can learn for low-level knowledge.
C to learn more practical knowledge of low-level workings, since almost all languages are implemented in C.
C++ for object-oriented programming on top of the low-level goodness of C.
Pascal to learn how to work with strong typing.
Java to see how you can shield yourself from low-level concerns.
Perl to learn regular expressions, weak/dynamic typing, and other good things.
Python to see strong/dynamic/duck typing.
Ruby to see how object-orientedness works on top of Perl-esque weak/dynamic typing.
Common Lisp for that functional enlightenment.
Scheme for the emphasis on recursion.
Emacs Lisp so you can extend Emacs.
Haskell to see pure functional programming done right.
APL so you learn how not to write code.
COBOL so you can make mad money maintaining legacy code.
Erlang to really learn about concurrency. (Thanks to Pete Kirkham for correcting me.)
Scala for functional programming on the JVM.
Clojure for a Lisp-like functional language on the JVM.
Prolog to understand logic programming.
D so you can see why all the D fanatics are always so pro-D.
C# so you can program for .NET (and Mono).
F# so you can do functional programming on .NET.
Forth for stack-based languages.
PHP so you can see how not to create a language. (Just kidding. Learn PHP beacause it's really useful for web development.)
JavaScript because it's basically the language for client-side web scripting.
bash for a good, general-purpose scripting language.
Visual Basic so you can read the code your boss wrote. =)
INTERCAL for "fun."
brainfuck so you can torture your friends.
LOLCODE so you can convince them to still be your friends after you subject them to brainfuck.
...And so on.

C for understanding how the most other language(-implementations) and operation systems are implemented

I think the three languages that best combine practicality and coverage of programming concepts would be
C
Python
Javascript
From these languages you can learn low-level system programming, pointers and memory management, static typing, dynamic typing, high-level scripting, event-driven programming, OO programming, functional programming.
Obviously you're not going to get as pure an intro to functional programming as you would with, say, Haskell, but you can learn a lot of the concepts in Python and (especially) Javascript.

It is not the languages rather the paradigms you should know:
procedural (like C, Pascal)
object-oriented (like Java, C++, Smalltalk)
functional (like Lisp, ML, Scala)
If you understood one of these paradigms in one language, it is easy to learn another language in the same paradigm. And there are even more fields specially supported by languages that are important to understand:
parallelism (in Erlang or Scala)
declarative templates (e.g. in C++ or Prolog)
dynamic languages (e.g. JavaScript)
At at last you should always know what goes on under the hoods, so you better have a look at assembler.

I would say:
C or Assembler to understand how the processor work.
Smalltalk (or C#, Java, Python, Ruby, etc) to understand object oriented programming.
Lisp (any Lisp, Scheme, Common Lisp, Clojure) to understand high level programming, meta programming (macros), etc.
Haskell to understand type inference and other functional concepts.
If you are into distributed systems, I'll consider learning Erlang too. Those are the language I recommend learning, even if only superficial, only for the sake of learning even if you never use them to write a real application.

Its best to know a variety. This gives you a better overall perspective of the art of programming, plus, you get to choose the best tool for the job.
My current list would be:-
C - programming close to the machine.
Python - programmers nirvana.
Perl - for when s**t happens.
Java - cause it will keep you in work.
C# - cause it will keep you in work.
lisp, scheme or something functional to get your brain out of a rut.
SQL - for managing large data sets.
JCL, COBOL, VAX DCL, CShell VB - just to remind you how bad things could be!

A good short list:
C for the machine concepts
Haskell for functional programming
Smalltalk (or maybe Ruby or Simula-67) for object-oriented programming
Prolog for logic programming
Icon for backtracking and mind-blowing string processing
Bourne shell for Unix scripting
Might also include
Scheme for macros
Awk or Perl or ... for regular expressions
FORTH for tiny bootstrapping postfix wonderfulness :-)

For concepts, I would choose assembler and Java.
The first because you should know in intimate detail how machines work.
The second because you should understand how to shield yourself from the intimate details of the way machines work :-). By that I mean a language with a rich set of data structures at hand (so really Java could be Python, C++ with Boost and so on).

Well. I'd say learn C and javascript. They are most widely used languages.
You might want to learn Java/some .Net language and/or python/ruby: they're more convenient, tho.
This have the advantage that all those languages are reasonably well designed.
For example, don't learn PHP or C++ because they're a mess. They're used widely, you might want to learn them one day, but they can seriously mess with your mind.

Limbo - a programming language with concurrency and channels, what C should have evolved into. ( see also D, another C successor )
No-one else seems to be mentioning any declarative languages, so here are a few:
Prolog - a declarative language for logic programming
Modelica - a declarative OO language for modelling systems.
XSLT - a declarative language for transforming XML.
For parallelism, you don't get much wider than shader language, and the related OpenCL - typically 512 processors in parallel on a high-end desktop, rather than Erlang's 4 processors in parallel ( though with many scheduled processes ).

This is a good question. I know a lot of people, myself included, get stuck in a rut where we are just churning out code like one would churn out burgers at a McDonald's. Coding becomes too mechanical—we understand how to get things done, but often times we forget why these things get done behind the scenes.
In my world it's been C++/C/ObjectiveC that have taught me the most, even though I write C# every day at work.
For the most part, learning C++ has helped me learn about memory management and how the various objects are stored in memory, etc.—the actual science of programming. What really opened my eyes was the Programming Paradigms class offered at Standford that you can get off of iTunes and I think YouTube.

You already mentioned two, here are a few more:
Java: Java is a good example of OOP 'cause you HAVE to use oop, and it's designed from the ground up to be an OOP language.
BASIC: Although obsolete, it's a good example of procedural languages and it has a very easy syntax.

For web programming: PHP, ANSI-SQL, javascript.
Some people may argue that HTML and CSS are not programming languages. But they are esential for web app development.
For Desktop app development, C++ with the Qt Framework. Qt gives C++ the additional "cross-platform" fizz.

Pascal or Basic for start and to master basics of procedural programming.
At school we learned Haskel for functional programming.
And then one should try assembler or C for getting deep and Java for OOP.
A have no arguments for this - that's only my taste and what I tried.

I would sat C/C++ cause it sets allot of basics for allot of other languages used around the world.
Personally I learned Java/JavaScript->VB(short course fortunately)->C#->C++, with a pinch of PHP and Perl on top of it all. Best part of that line was C# and then moving behind the scene in C++.

Look for a set of different programming languages:
C++ / C# / Java etc.
C / Assembler
Python, Ruby, Lua, Perl etc.
sh, awk, sed, regular expressions
Prolog (or similar)
Haskell / Lisp etc.
It doesn't really matter which ones you choose, but that you choose one from each "category".

Pseudocode for reading/writing documentation. :p
I think knowing C/C++ or any other low level language will help you with understanding the impacts of how managed/script languages works helps. Such as pointers will demystify variable references.

If you want to understand computers and the underlying hardware, C is the single most important language, commonly said to be the lingua franca of computers. The Stackoverflow podcast tends to cover this at least once a week.
There seem to be enough answers on this, so I'll just leave it at that.

You should know a scripting language so that you can prototype your applications faster.
Maybe python/ruby/perl . Groovy is also an alternative if you're a Java guy that likes his java libs.

Alot is already mentioned but I would definitely add C++ (already done) for the following reason:
C++ for learning how to use pointers and get the main idea about them.
Although there is the discussion if c++ is still the 'better' language (all depends on what you want to make really) it never hurts to understand pointers, just in case you do need them ever.

Having a scan through the answers so far I'm surprised I've not seen any mention of actionscript.
I think if you learn some C/C++, then some Java then that should prepare you for pretty much all of the decent languages out there.
I prefer to see my code in action and I find Actionscript 3 (not 2 or 1) along with Flex (which is MXML) great for quickly demoing visual concepts.
So C & Java helps to learn the syntax of the majority of languages.
Actionscript 3 (very similar to java syntax) & MXML for being able to express you code visually very quickly.

C - low level system programming plus to understand generic concepts about how memory is handled, stack, stack frame, heap and so on. These are helpful for understanding higher level languages
C++ - mainly std library (separation of generic algorithms and containers), templates, namespaces, but OO concepts as well. Templates meta programming will give you completely different perspective on writing software, this is compile time execution versus run time execution. Templates inheritance (static vs dynamic polymorphism).
Python - dynamic type system, list comprehension - functional programming (?), no memory management for developer, spaces for indentation
Objective-C - message dispatching (can dispatch to nil), dynamic type system (static as well), late binding, OO concepts

It may sound crazy, but I first learned to program writing VBScript macros for windows. I used a template, which is available here http://vbscript-macro-template.blogspot.com/ and I just added to it and also tried to understand everything that it did. Now, several years later I am writing my own desktop and database applications.

You should start from C and go through C++, Java and the goto WinForms,
Then better goto .NET

Related

How to go about making your own programming language? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Learning to write a compiler
I looked around trying to find out more about programming language development, but couldn't find a whole lot online. I have found some tutorial videos, but not much for text guides, FAQs, advice etc. I am really curious about how to build my own programming language. It brings me to SO to ask:
How can you go about making your own programming language?
I would like to build a very basic language. I don't plan on having a very good language, nor do I think it will be used by anyone. I simply want to make my own language to learn more about operating systems, programming, and become better at everything.
Where does one start? Building the syntax? Building a compiler? What skills are needed? A lot of assembly and understanding of the operating system? What languages are most compilers and languages built in? I assume C.
I'd say that before you begin you might want to take a look at the Dragon Book and/or Programming Language Pragmatics. That will ground you in the theory of programming languages. The books cover compilation, and interpretation, and will enable you to build all the tools that would be needed to make a basic programming language.
I don't know how much assembly language you know, but unless you're rather comfortable with some dialect of assembly language programming I'd advise you against trying to write a compiler that compiles down to assembly code, as it's quite a bit of a challenge. You mentioned earlier that you're familiar wtih both C and C++, so perhaps you can write a compiler that compiles down to C or C++ and then use gcc/g++ or any other C/C++ compiler to convert the code to a native executable. This is what the Vala programming language does (it converts Vala syntax to C code that uses the GObject library).
As for what you can use to write the compiler, you have a lot of options. You could write it by hand in C or C++, or in order to simplify development you could use a higher level language so that you can focus on the writing of the compiler more than the memory allocations and the such that are needed for working with strings in C.
You could simply generate the grammars and have Flex and Bison generate the parser and lexical analyser. This is really useful as it allows you to do iterative development to quickly work on getting a working compiler.
Another option you have is to use ANTLR to generate your parser, the advantage to this is that you get lots of target languages that ANTLR can compile to. I've never used this but I've heard a lot about it.
Furthermore if you'd like a better grounding on the models that are used so frequently in programming language compiler/scanner/parser construction you should get a book on the Models of Computation. I'd recommend Introduction to the Theory of Computation.
You also seem to show an interest in gaining an understanding of operating systems. This I would say is something that is separate from Programming Language Design, and should be pursued separately. The book Principles of Modern Operating Systems is a pretty good starting place for learning about that. You could start with small projects like creating a shell, or writing a programme that emulates the ls command, and then go into more low level things, depending on how through you are with the system calls in C.
I hope that helps you.
EDIT: I've learnt a lot since I write this answer. I was taking the online course on programming languages that Brown University was offering when I saw this answer featured there. The professor very rightly points out that this answer talks a lot about parsers but is light on just about everything else. I'd really suggest going through the course videos and exercises if you'd like to get a better idea on how to create a programming language.
It entirely depends on what your programming language is going to be like.
Do you definitely want it to be compiled? There are interpreted languages as well... or you could implement compilation at execution time
What do you want the target platform to be? Some options:
Native code (which architectures and operating systems?)
JVM
Regular .NET
.NET using the Dynamic Language Runtime (like IronRuby/IronPython)
Parrot
Personally I would strongly consider targeting the JVM or .NET, just because then you get a lot of "safety" for free, as well as a huge set of libraries your language can use. (Obviously with native code there are plenty of libraries too, but I suspect that getting the interoperability between them right may be trickier.)
I see no reason why you'd particularly want to write a compiler (or other part of the system) in C, especially if it's only for educational purposes (so you don't need a 100-million-lines-a-second compiler). What language are you personally most productive in?
Take a look at ANTLR. It is an awesome compiler-compiler the stuff you use to build a parser for a language.
Building a language is basically about defining a grammar and adding production rules to this grammar. Doing that by hand is not trivial, but a good compiler-compiler will help you a lot.
You might also want to have a look at the classic "Dragon Book" (a book about compilers that features a knight slaying a dragon on the front page). (Google it).
Building domain specific languages is a useful skill to master. Domain specific languages is typically not full featured programming language, but typically business rules formulated in a custom made language tailor made for the project. Have a look at that topic too.
There are various tutorials online such as Write Yourself a Scheme in 48 hrs.
One place to start tho' might be with an "embedded domain specific language" (EDSL). This is a language that actually runs within the environment of another, but you have created keywords, operators, etc particularly suited to the subject (domain) that you want to work in.

What are the new language choices for Experienced programmers?

I know the topic I started is too subjective. But I just
wanted some expert guidance learning new languages. I've
been working with .NET languages (C#, VB.NET) quite a few
years (around 4). And it's been years since I stopped
experimenting with new laguages after settling down in a job.
Few weeks back I just started working on my personal
project, which I am going to spend much time in the coming
months. During the analysis I found that I just can't
accomodate the luxuries of cost effective languages,
programs and IDEs. So I planned to move to the wide spectrum
of open source languages and tools.
And when I look at the current choices, I was just
speechless. Hundreds of promising open languages and
toolsets and I found it's hard to choose. And I can't even
think of evaluating each language myself (it's a worst
nightmare). Currently I started with Mono (for the sake of
C#).
I felt this is going to be a good chance for learning new
programming languages and models. So I am open to any
language that offers me the following:
more functional
dynamic language features
better language elegance (like lambdas, Haskel like SQL syntaxes or C# LINQ)
better community support
must be open
easy interaction with the web
support for parallelism and concurrency (easy threading)
better in performance
proven web frameworks
better IDE support (I got this ease of use syndrome after using years of MS tools)
I love the Haskel and Erlang language programming approach.
But I don't have a clue about these languages' web stack and
concurrency mechanisms.
EDIT:
i would appreciate few reasons along with your choices. It will be really helpful.
I think that all these meet your requirements:
Groovy + Grails or
Python + one of these Web Frameworks or
Ruby + Rails/Camping/Merb/Sinatra or
Scala + Lift
My bet is that you'll get the groovier IDE experience with Groovy (and it's Groovy Eclipse Plugin).
Learn OOP, DesignPatterns, understanding of Algorithms... the rest is "just" language. You will find, if You learn 5th... 8th language there are some similarities, some prons and cons... what You need learn is to move business needs to some technical platform.
Weird. I can't believe noone has suggested Python yet.
These are not new languages, but I vote that if you have experioence with them, then you will be a better programmer in whatever language you choose to use:
Smalltalk (or Objective-C), otherwise you have not experienced OOP.
Lisp for functional, reflective, meta programming.
Prolog for logic programming.
All of these are quite far from your basic C-like language, both in concept and syntax.
Alan Kay invented OOP and Smalltalk, he is quoted as "C++ is not what I intended", and C++ is what most of todays OOP-languages mimics. C++-style OOP is merely syntactic sugar ontop of structs with function pointers. OOP can be so much more. Ruby is closely related, but you would miss out on interleaved method names.
Lisp has been around since 1958, and the fans keep saying that everything that gets added to any new language is just something borrowed from Lisp. Maybe not strictly true, but somewhat accurate, Lisp had garbage collection 50 years ago. Easiest way to experience it today would be to write something in Clojure.
Prolog is based on formal logic. Prolog is declarative, where you declare facts and rules and is executed by constructing queries on these relations. Kind of like puzzle games in some magazines :).
In the .NET world sounds like you're talking either F# and IronRuby. IronPython might also suit your needs.
Personally I'm going to give a vote for Python, Ruby and Mono.NET.
Of the three you were probably on the right track when you said you looked at Mono; it's C# (which you have previous experience with), there are good, free IDEs available SharpDevelop being one which makes it cheap and there's a really solid community behind it all.
You don't really say what kind of programming you want to do. Do you already know C/C++? If not, I'd really recommend learning those instead of anything new and fancy.
However, if it's new and fancy that you want and you'd like to be able to write native apps, then I'd have a look at:
D
It's similar to C++, but hopefully better in many ways. It has the advantage of out performing most other new and fancy languages and most of the features on your wish list.

What to learn? Lisp or OCaml or...? [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 9 years ago.
I already have a few languages under my belt (in a rough order of expertise): Python, C, C++, PHP, Javascript, Haskell, Java, MIPS, x86 assembler. But it's been almost 2 years since I learned a new one, and I'm starting to get the itch. I have a few criteria:
Must (repeat: must) have a free Linux implementation
Should be different from the languages I already know. In other words, it should have features that get me thinking about solving problems in a new way.
Should have some potential for practical use. It doesn't need to be the next Java, but this rules out Brainf* and Shakespeare :) I don't really care how many job postings does it have, but real-world apps and libraries are a plus.
Should have at least just enough free learning materials to get me started in it.
I was thinking Lisp (CL? something else?) or OCaml. I already have some experience with functional languages with Haskell (yes I know that Lisp/OCaml are multi-paradigm). I'm not an expert - e.g. parts of code from Real World Haskell can still contort my brain, but I understand the basic concepts and some advanced ones (functors, monads).
Which one to choose? Any other languages that I have overlooked? Also, could you please include some useful links to good books/tutorials etc.
Neither Lisp nor OCaml is super far afield from what you already know. Here are four suggestions chosen partly for intrinsic interest and partly to stretch your horizons.
A logic programming language, probably Prolog. I haven't found good materials online, but the book The Art of Prolog by Sterling and Shapiro is excellent. The more basic textbook by Clocksin and Mellish is also good. The main point of interest is programming with relations, not functions.
A pure object-oriented language, either
Smalltalk or Self. If you've only used hybrid object-oriented languages you'll be amazed how beautiful pure object-orientation can be. I've linked to the Squeak implementation of Smalltalk. I personally would recommend learning Smalltalk before tackling Self; there's a very large and active community and the software is well developed. Self stands on Smalltalk's shoulders and is an even more inspiring design, but the community is much smaller. For those who have access to the ACM Digital library I recommend the excellent talk by Dave Ungar at HOPL-III; the paper is also pretty good.
The Icon programming language has two great things going for it; a powerful and unusual evaluation model with implicit backtracking, and a user-extensible model of string processing that beats regular expressions all hollow. I'm sorry to say that Icon has never quite kept pace with the times, and of all my recommendations it is the least practical. In fact I fear the language is moribund. But it will stretch your mind almost as much as Haskell, and in wildly different directions. Icon is still very useful for string-processing tasks of modest size.
You can read about Icon string processing in an article by Ralph Griswold from Computer Journal.
The Lua programming language is my last and least radical suggestion. Its interest is not so much in novel language features or paradigms but in the superb engineering of the language and its implementation. Lua occupies a number of niches, including scripting, gaming, string processing, and lightweight functional programming. But its main point of interest is its seamless integration with C, and to get the full benefit, you should bind a C library into Lua.
The HOPL-III web site also contains an excellent talk and paper about Lua.
Both Common Lisp and Ocaml are certainly useful to learn. If you already know Haskell, CL might be the more different experience.
SBCL and Clozure CL are both very useful implementations of Common Lisp on Linux. (Overview about various implementations: Common Lisp survey.)
As a starting point I would recommend to use Peter Seibel's excellent book Practical Common Lisp, that is both available online and printed.
Community pointers are here: CLIKI.
Prolog may be what you are looking for.
Edit
The first commenter is right, my answer was pretty short and not very useful, so:
My preferred implementation is SWI-Prolog. I personally learned from Prolog Programming for Artificial Intelligence. It's style is pretty clear and it contains many examples, but I don't own any other book on logic programming (it's a shame, really :) so I have no basis for comparison.
Erlang is pretty interesting to learn because of its super efficient concurrency model, and the ease with which you can write distributed systems (for an example of this, CouchDB was written in Erlang). It's a dynamically typed functional language, but you can also write code in a procedural fashion. The tutorial I learned it with is called "Getting Started with Erlang", which covers just about every part of the language.
If you want to make use of your Java and functional programming knowledge, and you want to learn a Lisp, then try Clojure.
The implementation is free and cross-platform including Linux, because it runs on the JVM. Being a Lisp, it's different enough (in useful and wonderful ways) from most other languages to make things interesting. Some features such as immutable data structures, multimethods, metadata support, focus on safe concurrency, etc. are fairly novel compared to the languages you listed. Clojure is geared heavily toward being a practical and useful language rather than an academic one. It's a functional language but not "pure", which is arguably a good thing. You can also trivially make use of any Java library from within Clojure.
Clojure is a new language, so the only book out so far is Programming Clojure, but it's a pretty good one. There's also a wiki which may not be entirely up-to-date, because the language is still evolving very quickly. The mailing list and IRC channel are very friendly, welcoming places to ask questions. The official website is also a good resource, of course.
I'm going to recommend something that I haven't yet tried, but plan to, so you have to judge for yourself this one. There's this language, called IO, which is particular in that its prototype-based, like JavaScript, but also borrows concepts from many other languages. Its job market it's probably nonexistent, but I thought I mention this language.
Otherwise, a language from the Lisp family may be pretty different from what you already know. In that regard I'd recommend Scheme, which is, in my opinion, more elegant than Common Lisp. The new concept that you might found interesting in Scheme is continuations.
If you take the Scheme path, make some time to watch these videos from 1986. They're amazing.
Have a look at Smalltalk ! Either Cincom VWST or Smalltalk/X - dont bother with Squeak as the interface is terrible). VAST is good also but really only Windows centric. And dont bother about the sceptics that pore scorn on Smalltalk -- they arent using it and are stuck in the morass of edit-run-debug cycle languages and multiple dispirt linked libraries. :-)
Why these Smalltalks - well, they come complete wth excellent IDE, GUI tools builtin, best debugger you will ever see, online help, and is totally independent of the underlying OS. Eg a ST/X programming running under Linux can be transfered ( source code) to Windows ST/X and it should execute.
ST/X is free with only a very minor licience restrictions, Cincom offer a free NC ( Not Commercial ) version that is NOT restricted. I use ST/X as I prefer the default look & feel
it offers. Their IDE interfaces are very similar.
Languages without a IDE & GUI tools are just wasting your time as the world is really GUI, no matter how terrific the underlying language is. Eg Ruby is great, but with no IDE or easy GUI tools its really frustrating.
Smalltalk is not easy to get into, and its not perfect,(what language is?) but very satisfying to learn & use. And now that the hardware and operating systems have finally caught up with Smalltalks needs . very efficient.
I second Rainer's Common Lisp recommendation.
CL has all the things you're looking for and will provide a genuinely novel experience that will also make your coding efforts and approaches in other languages better.
But bring patience and persistence, you will have to grasp a lot of concepts that will seem alien at first.
You could try Tcl. It was sufficiently different to provoke an adverse reaction in my brain, so I can't really tell you how I found it different, but there's been a lot of good stuff written in it (maybe less nowadays than earlier).
C# has a free implementation in Linux under the Mono project, and it arguably is a very marketable skill unless you're completely anti-Microsoft.
My favorite C# book is Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition.
If you're really want exotic, F# is an OCaml style language that runs on the .NET platform and mono, and is getting a lot of attention these days.
http://msdn.microsoft.com/en-us/fsharp/default.aspx
Books for F#:
http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Daps&field-keywords=f%23
Of the suggestions I've seen so far, I like Lisp (see Secko) and Smalltalk (see brett), as both will give you another view of languages. Prolog even more so.
Another language that is different is Erlang -- I haven't had a chance to learn it yet, but it handles concurrency in a different way. The best link I can give you is the main website.
In terms of recommendations, Lisp is good both because it is currently used and because it is very old. The others you will have to look at sources and see which one appeals the most.
Try FORTRAN, then? I hear it's still actively used by the scientific and mathemematical communities, plus it should be dissimilar enough to be a learning challenge.
Compilers:
http://gcc.gnu.org/wiki/GFortranBinaries
http://www.g95.org/
http://www.fortran.com/compilers.html
http://www.thefreecountry.com/compilers/fortran.shtml
IDEs:
http://www.eclipse.org/photran/
http://force.lepsch.com/ (FORTRAN 77 only)
Tutorials:
Introduction to Modern FORTRAN: http://www-uxsup.csx.cam.ac.uk/courses/Fortran/
FORTRAN 90 Tutorial: http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/fortran.html
You could also learn Visual Basic.NET, in case you ever get forced to maintain that. Evidently mono has a working Linux implementation of it:
http://www.mono-project.com/Visual_Basic
Factor is pretty radically different from everything you said you know, and also everything else listed. It's stack-based, like Forth, but has a fairly comprehensive library and a lot of interesting features.
Ada is very practical -- there's a compiler based on gcc -- but also quite different from the other imperative languages you know. I find the type system a bit stifling, but it was worth learning something about.
Lisp is a great HLL, it has everything that other languages lack. In my opinion, this is a very good language that can "satisfy" any programmers needs.
Perl is also a HLL like Lisp, it's interesting and fun at the same time. It derives from C so you can pick it up as you go. It can be hard sometimes and some people tend to get lost while learning, but it's worth knowing.
Both languages are free of use and come with Linux.
Links
Lisp:
If Lisp is so great,
An Introduction and Tutorial for Common Lisp
Perl:
PERL -- Practical Extraction and Report Language
Books
On Lisp - Great book by Paul Graham on the Lisp language. It's free and you can download it here.
Scala has been very good for making me see programming in a new light. I haven't used it for anything worklike yet, but it's still affected how I write code in other languages - not just Java, but PHP. I recently wrote a simple parser for a WordPress plugin, and the code is vastly more functional and immutable than it would have been six months ago, and better for it, despite the lack of enforcement in PHP.
The only other language to have affected the way I work so dramatically is Perl, nearly a decade earlier. Perl has contributed a lot to the way I pseudo-code, even if I never touch the language itself.
Many people compare the functional aspects of Scala to Haskell. You may even imagine that knowing Haskell means you already know all Scala could teach you, but I don't believe that. The way Scala combines OO and function has a way of making it seem like that's actually the truest form of both of them.
Like you, I have over a dozen languages under my belt. While shopping for something to play with for writing a cross-compiler, I ran across ML and family. Many very good ideas there, and they have taught me to write code is a much different way; for example, my JavaScript now has a decidedly functional bent.
After toying with OCaml under Windows a while (and getting frustrated with stability issues), I ran across F#, an offspring of OCaml. The two are quite similar (can cross-compile a lot of code), but OCaml apparently has a really good macro system (P4) and type-classes (in support of writing "strongly typed" operators against generic types), while F# has excellent support for asynchronous and parallel operations, monads, units-of-measure for numeric types, as well as cleaner OO syntax and awesome IDE integration (VS2008 & will be released in-the-box with VS2010). I much prefer F# these days, since I have access to the whole .NET runtime and loads of 3rd party libraries. In fact, I write most of my one-off and utility code in F# now; for me, its generally much more productive than C++, JavaScript, C#, PowerShell, or anything else.
F# works fairly well under Mono on Linux, and has a good following there. The compiler and runtime will be open sourced once stable (released with VS2010), and the developers consider Mono support enough of a priority for it to be seriously considered for non-Microsoft use.

Logical Languages - Prolog or Lisp/Smalltalk or something else?

So, I am writing some sort of a statistics program (actually I am redesigning it to something more elegant) and I thought I should use a language that was created for that kind of stuff (dealing with huge data of stats, connections between them and some sort of genetic/neural programming).
To tell you the truth, I just want an excuse to dive into lisp/smalltalk (aren't smalltalk/lisp/clojure the same? - like python and ruby? -semantics-wise) but I also want a language to be easily understood by other people that are fond of the BASIC language (that's why I didn't choose LISP - yet :D).
I also checked Prolog and it seems a pretty cool language (easy to do relations between data and easier than Lisp) but I'd like to hear what you think.
Thx
Edit:
I always confuse common lisp with Smalltalk. Sorry for putting these two langs together. Also what I meant by "other people that are fond of the BASIC language" is that I don't prefer a language with semantics like lisp (for people with no CS background) and I find Prolog a little bit more intuitive (but that's my opinion after I just messed a little bit with both of them).
Is there any particular reason not to use R? It's sort of a build vs. buy (or in this case download) decision. If you're doing a statistical computation, R has many packages off the shelf. These include many libraries and interfaces for various types of data sources. There are also interface libraries for embedding R in other languages such as Python, so you can build a hybrid application with a GUI in Python (for example) and a core computation engine using R.
In this case, you could possibly reduce the effort needed for implementation and wind up with a more flexible application.
If you've got your heart set on learning another language, by all means, do it. There are several good free (some as in speech, some as in beer) implementations of Smalltalk, Prolog and LISP.
If you're putting a user interface on the system, Smalltalk might be the better option. If you want to create large rule sets as a part of your application, Prolog is designed for this sort of thing. Various people have written about the LISP ephiphany that influences the way you think about programming but I can't really vouch for this from experience - I've only really used AutoLISP for writing automation scripts on AutoCAD.
At the risk of offending some, I have a hard time reconciling "easily understood by other people that are fond of the BASIC language" with any of the languages you mentioned. That's not intended as a criticism, but as an observation that each of the languages you mention has a style and natural idiom that's quite different from that of BASIC.
Smalltalk - pure OO from the ground up, usually (e.g. Squeak) coupled with an integrated environment that is simultaneously the IDE and the runtime. IOW you enter the Smalltalk VM and work inside it rather than just writing a text that is "source code".
LISP - much closer to functional programming (although with imperative overtones); the prefix notation is the first barrier to most people who "like" other languages, but the concept and use of macros is a much more substantial one.
Clojure - The combination of LISP, OO, and JVM integration makes this one even less BASIC-like.
Python and Ruby - I lump these together (at the risk of further annoying fans of either ;-) because they are both OO language with distinct notations that will take an outsider a bit of learning curve. The use of indentation-only for control nesting in Python and the Perl-like use of special characters in Ruby are often points of the complaint by newcomers. Although both can be written in an imperative style, that would be considered non-standard by seasoned users.
Prolog - This is the most unlike BASIC of all languages mentioned. All of the other languages you mentioned can be (ab)used in a semi-procedural style, but that is essentially impossible in Prolog. It requires a thorough understanding of, and comfort with, recursion to do anything non-trivial.
Code written with a "native accent" in essentially all of these languages (but especially Prolog, IMHO) will make use of idioms and concepts that are outside the norm for conventional BASIC programming. Put another way, if you pick one of these and then write code "with a BASIC accent" you've pretty much wasted the benefits that the language can offer.
I believe that all of them are worth learning for the concepts they can teach (or at least reinforce, depending on your background). But the similarity to Language X (for a wide range of values of X) is not what you'll get.
I can answer you partially
(aren't Smalltalk/Lisp/Clojure the same? - like python and ruby? -semantics-wise)
No, it is not. Smalltalk is OO language with message pass instead method calls. Lisp is Lisp ;-) It means truly functional language with the powerful macro system, OO support which is never seen in other languages (in CL) and many more features. Closure is Lisp-like language without many Lisp features but good integration to JVM. It's not supporting tail call optimization for example. And python or ruby are classic imperative OO languages with some limited functional ability. Note word limited. For example, Guido doesn't like functional programming and removed some functional features in version 2.5 and 2.6.
If you familiar with imperative procedural programming as in Python and you want to change your paradigm you should make your decision carefully.
Prolog is a very different language. It can be very hard to grasp, mainly because it relies heavily on recursion to do very basic tasks. If you are really willing then give it a go. It can be very powerful because it allows to expess relationships and solve complicated problems simply, typical examples are Towers of Hanoi or quicksort. It will change the way you think, which can be difficult if you are used to imperative languages.
If you're interested in Prolog then there's a free version of Visual Prolog available and the commercial version is reasonably priced.
It's a strong type offshoot of Prolog so isn't your classic implementation of the language, but has a respectable history - Borland marketed the DOS ancestor of it as Turbo-Prolog back in the late '80s.
It's also Windows only, but can be used to create standard Windows DLLs so you can link your code into a 'normal' windows programming language. I've never used the package in anger myself, but I did a couple of Prolog courses at Uni so have downloaded it from time to time to play with and look for possible uses and it looks solid enough. Might be just the set of cogs you're looking for.

Most interesting non-mainstream language? [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.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I'm interested in compilers, interpreters and languages.
What is the most interesting, but forgotten or unknown, language you know about? And more importantly, why?
I'm interested both in compiled, interpreted and VM languages, but not esoteric languages like Whitespace or BF. Open source would be a plus, of course, since I plan to study and hopefully learn from it.
I love compilers and VMs, and I love Lua.
Lua is not as well supported as many other scripting languages, but from a mindset like yours I'm sure you will fall in love with Lua too. I mean it's like lisp, (can do anything lisp can as far as I know), has lots of the main features from ADA, plus it's got meta programming built right in, with functional programming and object oriented programming loose enough to make any type of domain language you might want. Besides the VM's code is simple C which means you can easily dig right into it to appreciate even at that level.
(And it's open-source MIT license)
I am a fan of the D programming language. Here is a wikipedia article and and intro from the official site.
Some snippets from the wikipedia article:
The D programming language, also known simply as D, is an object-oriented, imperative, multiparadigm system programming language by Walter Bright of Digital Mars. It originated as a re-engineering of C++, but even though it is predominantly influenced by that language, it is not a variant of C++. D has redesigned some C++ features and has been influenced by concepts used in other programming languages, such as Java, C# and Eiffel. A stable version, 1.0, was released on January 2, 2007. An experimental version, 2.0, was released on June 17, 2007.
on features:
D is being designed with lessons learned from practical C++ usage rather than from a theoretical perspective. Even though it uses many C/C++ concepts it also discards some, and as such is not strictly backward compatible with C/C++ source code. It adds to the functionality of C++ by also implementing design by contract, unit testing, true modules, garbage collection, first class arrays, associative arrays, dynamic arrays, array slicing, nested functions, inner classes, closures[2], anonymous functions, compile time function execution, lazy evaluation and has a reengineered template syntax. D retains C++'s ability to do low-level coding, and adds to it with support for an integrated inline assembler. C++ multiple inheritance is replaced by Java style single inheritance with interfaces and mixins. D's declaration, statement and expression syntax closely matches that of C++.
I guess a lot depends on what you mean by 'non-mainstream'.
Would lisp count as non-mainstream?
I would suggest having a look at Erlang - it's been getting a bit of press recently, so some of the learning resources are excellent. If you've used OO and/or procedural languages, Erlang will definitely bend your mind in new and exciting ways.
Erlang is a pure functional language, with ground-up support for concurrent, distributed and fault-tolerant programs. It has a number of interesting features, including the fact that variables aren't really variables at all - they cannot be changed once declared, and are in fact better understood as a form of pattern.
There is some talk around the blogosphere about building on top of the Erlang platform (OTP) and machine support for other languages like Ruby - Erlang would then become a kind of virtual machine for running concurrent apps, which would be a pretty exciting possibility.
I've recently fallen in love with Ocaml and functional languages in general.
Ocaml, for instance, offers the best of all possible worlds. You get code that compiles to executable native machine language as fast as C, or universally portable byte code. You get an interpreter to bring REPL-speed to development. You get all the power of functional programming to produce perfectly orthogonal structures, deep recursion, and true polymorphism. Atop all of this is support for Object-Orientation, which in the context of a functional language that already provides everything OOP promises (encapsulation, modularization, orthogonal functions, and polymorphic recyclability), means OOP that is forced to actually prove itself.
Smalltalk (see discussion linked here). Sort of the grand-daddy of the dynamic languages (with the possible exception of Lisp and SNOBOL). Very nice to work with and sadly trampled by Java and now the newer languages like Python and Ruby.
FORTH was a language designed for low level code on early CPU's. Its most notable feature was RPN stack based math operations. The same type of math used on early HP calculators. For example 1+2+3+4= would be written as 1, 2, 3, 4, + , +, +
Haskell and REBOL are both fascinating languages, for very different reasons.
Haskell can really open your eyes as a developer, with concepts like monads, partial application, pattern matching, algebraic types, etc. It's a smorgasbord for the curious programmer.
REBOL is no slouch either. It's deceptively simple at first, but when you begin to delve into concepts like contexts, PARSE dialects, and Bindology, you realize there's much more than meets the eye. The nice thing about REBOL is that it's much easier to get started with it than with Haskell.
I can't decide which I like better.
Boo targets the .NET framework and is open source. Inspired by Python.
Try colorForth.
PROLOG is a rule-based language with back-track functionality. You can produce very human-readable (as in prosa) code.
I find constraint languages interesting, but it is hard to know what constitutes forgotten or unknown. Here are some languages I know about (this is certainly not an exhaustive list of any kind):
Ciao, YAP, SWI-Prolog, and GNU Prolog are all Prolog implementations. I think they are all open source. Ciao, gnu prolog, and probably the others also, as is common in Prolog implementations, support other constraint types. Integer programming for example.
Mozart and Mercury are both, as I understand it, alternative logic programming languages.
Alice is more in the ML family, but supports constraint programming using the GECODE C++ library.
Drifting a little bit off topic....
Maude is an interesting term rewrite language.
HOL and COQ are both mechanized proof systems which are commonly used in the languages community.
Lambda-the-Ultimate is a good place to talk about and learn more about programming languages.
I would have to say Scheme, especially in it's R6RS incarnation.
Modula-2 is the non-mainstream language that I've found most interesting. Looks mainstream, but doesn't quite work like what we're used to. Inherits a lot from Pascal, and yet is different enough to provide interesting learning possibilities.
Have a look at Io at http://www.iolanguage.com/
or Lisaac at: https://gna.org/projects/isaac/
or Self at: http://self.sourceforge.net/
or Sather (now absolutly forgotten)
or Eiffel http://www.eiffel.com
Why here are a few reasons. Io is absolutly minimalistic and does not even have "control flow elements" as syntacit entities. Lisaad is a follow-up to Eiffel with many simplifications AFAIKT. Self is a followup to Smalltalk and Io has taken quite alot from Self also. The base thing is that the distinction between Class and Object has been given up. Sather is a anwer to Eiffel with a few other rules and better support for functional programming (right from the start).
And Eiffel is definitly a hallmark for statically typed OO-languages. Eiffel was the first langauge whith support for Design by contract, generics (aka templates) and one of the best ways to handle inheritance. It was and is one of the simpler languages still. I for my part found the best libraries for Eiffel.....
It's creator just has one problem, he did not accept other contributions to the OO field.....
Regards
I recently learned of the existence of Icon from this question.
I have since used it in answers to several questions. (1, 2, 3, 4)
It's interesting because of its evaluation strategy - it is the only imperative language I know that supports backtracking. It allows some nice succinct code for many things :)
Learning any language that requires you to rethink your programming habits is a must. A sure sign is the pace at which you skim through the documentation of a language's core (not library). Fast meaning fruitless here.
My short list would be, in my order of exposure and what were the concepts I learned from them:
Assembly, C: great for learning pointers and their arithmetic.
C++: same as C with an introduction to generics, as long as you can stand the incredibly verbose syntax.
Ruby/Lua: scripting languages, dynamically typed, writing bindings for existing C libraries.
Python/C#/Java: skipped, these languages look to me as a rehash of notions originating elsewhere with a huge standard library. Sure the whole packages are nice, but you won't learn new concepts here.
OCaml: type infererence done right, partial application, compiler infered genericity, immutability as a default, how to handle nulls elegantly.
Haskell: laziness by default, monads.
My €.02.
I can't believe Logo is so forgotten. Ok, it's Logo. Sort of like lisp, but with slightly uglier syntax. Although working with lists in Logo, one encounters the delightfully named 'butfirst' and 'butlast' operations. =P
ML. Learning it and using it forces you think differently about programming problems differently. It also grants one patience, in most cases. Most.
How about go? It's brand new, so it's unknown and not mainstream (yet).
It's interesting because the syntax looks like what happens after you put C and pascal into a jar and make 'em fight.
Well once it was called MUMPS but now its called InterSystems Caché
http://www.intersystems.com/cache/
First answer - Scheme. It's not too widely used, but definitely seems like a solid language to use, especially considering the robustness of DrScheme (which in fact compiles Scheme programs to native binary code).
After that - Haskell is incredibly interesting. It's a language which does lazy evaluation right, and the consequences are incredible (including such things as a one-line definition of the fibonnaci sequence).
Going more mainstream, Python is still not really widely accepted in the business circles, but it definitely should be, by now...
Ken Kahn's ToonTalk, a cartoon language with hard-core theoretic underpinnings:
http://www.toontalk.com/
Prograph: http://en.wikipedia.org/wiki/Prograph ... seems Prograph lives on as Marten:
http://andescotia.com/products/marten/
Self's IDE was/is a thing of beauty, talk about Flow (in the Csíkszentmihályi sense)...
Overall, though, I'd have to say Haskell is the most interesting, for the potential adavances in computing that it represents.
Harbour for dynamic type. Great opition to business apps.
Reia!
http://wiki.reia-lang.org/wiki/Reia_Programming_Language
It's Erlang made sense, it's beutifull and I'm in love. It's so unknown that it doesn't even have a wikipedia page!
The first major (non-BASIC) language that I learned was Dream Maker, from http://www.byond.com.
It's somewhat similar to C++ or Java, but it's largely pre-built for designing multiplayer online games. It's very much based on inheritance.
It's an intersting language especially as a starting language, it gets gratifying results quicker, and lets be honest, most people who are first learning to program are interested in one thing... games.
I find Factor, Oz and OCaml quite interesting. In fact, I have started using Factor for personal projects.
Rebol of course !
It's so simple but so powerfull learn it at http://reboltutorial.com
I've recently looked up a lot about Windows PowerShell.
While not necessarily just a language. It's an awesome shell that has a built-in scripting language. It's basically a super-beefed up command line shell.
Unlike Unix shells, where everything is string text (which definitely has it's benefits), PowerShell commands (cmdlets) use objects. It's based on the .Net framework so you guys who are familiar with that will have probably already figured out that anything PowerShell returns can be piped and the properties and methods of that object can be used. It's fun to say "everything is an object!" again just like when OOP was getting big.
Very neat stuff. For the first time, Windows is implementing some of the Unix command-line interface tools similar to grep and the whole bunch.
If you're interested in VMs, you should look at Parrot...There's a bunch of languages supported and that's pretty neat....
O'caml is a good language if you want to learn how to implement a compiler...

Resources