Fifth generation languages? - programming-languages

I have been asked for these kind of languages, my first naive attempt brought two list
List A)
A programming language based on constraints rather than algorithms to solve the problems. eg. Prolog
List B)
A programming language that contain visual tools to help develop a program. eg. VB
Digging deeply into the internet I feel the first one is more accurate, but the second is still appearing into the results.
So my question is: What are fifth generation programming languages? The first kind or the second?
I would appreciate any links, articles or any other useful resource to understand more about the topic.
EDIT
I'm bringing this to the main question:
Oscar: I've also found references to Prolog, Scheme, Heskell, Lisp while searching on the topic? Are these "more" 5th or are those like VB.
Charlie Martin: Well, Lisp can't really be a 5th gen language because it's older than everything except, maybe, FORTRAN. And Scheme is a dialect of Lisp. But yeah, I've seen functional languages -- Haskell, ML, Erlang, etc -- called 'fifth generation' –
So, is there a chance for constraint based programming languages be called 5th gen?
Thanks.

"Fifth generation programming languages" was an attempt to push logic programming, constraint programming, and satisfaction/unification based programming (like Prolog). Golly, that must have been back in the 80's. There was a big Japanese initiative, back when we thought Japan was Taking Over and Buying Everything.
The usual list of generations is:
Straight machine language, Goldstein
and von Neumann
Assembly languages
"High level" languages, starting
with FORTRAN, LISP, and COBOL.
Either report-generator languages
like RPG, or OO programming
Fifth generation
The terminology is pretty well out of favor today, I think.

To your "off topic" question. I am certainly not an expert in this field, but in my experience C# has an extensive resource of developmental Aids like visual development etc, very similar to VB and im pretty sure there are some great free ones out there. As far as Java goes, I am not to competent in that language but I don't remember it being very visual, but definitely more similar to flash then PHP forsay.

Related

How do I compare programming languages for projects at work?

I am wondering what are some specific questions I should keep in mind when I am comparing programming languages for use on given work projects. For instance, I am told logic programming languages like Prolog are good for natural language processing. I'm not sure why exactly; I assume it is true because experts say so, but I don't know the consideration that guides them to that conclusion. So I am looking for a simple heuristic, a checklist of questions, I can apply to evaluate programming languages and be able to explain my decisions, so that I can say "Language X is good for Y because it does Z."
The only way I know of to figure out which programming language is most appropriate for a given problem, is to know lots of programming languages. After all, if you don't know screwdrivers exist, how will you know not to use a hammer when you encounter a screw?
Unfortunately, there are thousands (maybe tens of thousands) of programming languages, so learning even a significant portion of them is just not realistic.
However, programming languages implement paradigms. And Peter van Roy's famous poster only lists about 34 of those. Although he deliberately decided to ignore several aspects, including anything related to typing, so the real number is probably higher than that. But we can expect it to be well below 100.
That's still a lot, though, but thankfully, paradigms aren't atomic either, they are composed of concepts. The poster lists about a dozen of those (again ignoring typing and a couple of other things). Significantly less than paradigms.
Learning a significant portion of concepts is entirely feasible. Once you know them, you can look at a problem and see which concepts would be useful to have to build a solution. Then you look at which paradigms contain those concepts and which languages implement those paradigms. Pick one, learn it, use it, solve the problem.
And since you already know the concepts (and thus the paradigms) the language implements, you only need to learn the syntax, not the semantics. There aren't actually that many different syntaxes in the wild (C, C++, Objective-C, Objective-C++, D, Go, Java, C#, ECMAScript, PHP, Vala and many others share a lot of syntax, for example, as do Smalltalk, Self, Newspeak and Objective-C, SML, OCaml and F#, and so on), so chances are, you'll pick that up very quickly. (Besides, with today's modern IDEs that's much less of an issue anyway.)
One small point to bear in mind: if you are an expert in language X and you are asked to develop a program in domain Y for which language Z is supposed to be ideal -- will you deliver sooner and better by writing in the language you are an expert in even if it is not (by some measures) ideal for the problem domain ? Or will you deliver better and sooner by first learning a new language ?
I think your search for a simple heuristic is in vain.
Start with what you're team is familiar with. While there's a lot to be said for the philosophy that a great developer can pick up almost any language in short order, there's a practical side that goes to the fact that if you have a ton of .Net or Java coders, you're best served in starting from that base.
Now, within both stacks you have options on things like functional programming (F#, Erlang, etc.) and other languages on the runtime your team is most familiar with. But it really does boil down to the culture, infrastructure, and (most importantly) the experience and flexibility of the individual developers on your team.
There are several factors to consider:
What is your local expertise? If you have a company full of C programmers, it's probably not worth retraining everybody to be Lisp programmers.
What are your libraries? If you have libraries that you want to use, make sure that they are compatible with your language of choice.
If you are starting a new project with a wide-open field of options, I would recommend taking a few sample problems out of the application domain. Nothing too complex, but nothing trivial either. Then, implement (or have someone from your team implement) these samples in each candidate language. Then, choose the one that is clear, easy, and appropriate.

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.

Haskell vs. procedural programming in the real world [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
These days I'm getting seriously into functional programming.
While I'm really excited about Haskell and the possibilities it seems to offer, I can also see now that it is going to take me a while to learn. In an SO question on How to learn Haskell an answer states that it'll take months if not years to actually "master" it.
Now, I know C, PHP, some object oriented stuff, etc. And having been told that Haskell isn't much used out there in "the real world", will I be better off improving my skills in the regular languages I know? Is Haskell worth the struggle?
In this question on Why people think functional programming will catch on the conclusion seems to be that functional programming will "catch on". But surely procedural programming will stay on top, right?
EDIT: keparo nicely clarifies my question to: As opposed to procedural languages, will it be valuable for me to study Haskell and functional programming paradigms?
Haskell isn't as hard as people like to make out to learn. Haskell opens up a new world that you never knew existed for you. It's as valuable to learn as any other language. You might not find a job requiring you to do Haskell programming, but does that really mean a language isn't valuable?
Haskell will teach you a lot of new stuff, and it will show you how to program even better in the languages you /do/ work with. You can do your own personal projects in your spare time with it.
Haskell isn't really used much in the "real world" if you define "real world" as "cash generator". So if that is your objective, then you might have to rethink objectives :p
Also, I don't really like that part of chosen "how to learn haskell" answer. It takes months to years to master any language, not just Haskell. Depending on how you define "master". I can use Haskell to a pretty good degree of efficiency and I've only been learning it for a month, and I've been taking it slow even.
If nothing else, the change in mindset that learning Haskell provides will help you when you have to go back to using those procedural languages that still are used in the workplace.
The functional paradigm is beginning to make it's way into various mainstream applications and languages - Even C++ is going to be adding a (crippled) lambda in C++0x.
You may also want to look at some of the hybrid languages like Scala or OCaml. Scala is being used at Twitter, and OCaml is being used at Jane's Street in a financial trading platform.
I learned Haskell because it was by far the best functional language that I tried out of Scala, Clojure, OCaml and Scheme but I didn't seriously expect to use it for work.
As it turns out, it is perfect for those sorts of odd jobs that are too small for a team and would be just too time consuming in Java. So far, I've used it for ad-hoc data migrations i.e. mangling CSV exports into another format, batch conversions of XML (HXT is more concise and more powerful than XSLT), screen-scraping off the internet and software project estimating including modelling risk using the probability monad and producing optimum gantt charts using backtracking. This is all real work that needed doing, that I wouldn't have even bothered to try and do in Java as it would be a multi-day undertaking.
I now use it instead of Excel for anything vaguely mathematical as it is little more effort to create a list of values in haskell source in a text editor than it is to type them into Excel. Once in haskell, I can then do all sorts of magic like backtracking, probability distributions etc. that Excel can't do. If I need a graph then I spit the values out as CSV (2 lines of code) and load them into Excel.
The only downside is that it does take several months to get proficient, but worth the effort IMHO.
You probably shouldn't expect to use Haskell anywhere nearly as often as a C family language in professional settings. If the question is whether it will be valuable for you to study Haskell and functional programming paradigms, the answer is yes. You can apply your enriched understanding of programming to all of your work.
As opposed to procedural languages, will it be valuable for me to study Haskell and functional programming paradigms?
If having an expanded skill set is valuable, then: yes.
One advantage you might pick up: parallel and concurrent programming. Procedural languages of the past tend to have no clear notion of side effects, as a result writing parallel programs in them is difficult to do correctly. Functional languages (in particular, ones that limit side effects like Haskell) have a lot more to say about productive parallel programming.
Having that skill up your sleeve can't hurt.
As opposed to procedural languages, will it be valuable for me to study Haskell and functional programming paradigms?
Not unless you want to be miserable. Luke Plant says, in Why learning Haskell/Python makes you a worse programmer:
So, learning Python and Haskell has demoralised me and encouraged
me to write code that is bizarre and difficult to understand...
(This is not entirely a joke.)
I can see that functional programming can be a plus in a production environment if it's very easy to use by non functional code. MS could see that too when they came up with F# I guess.
Since they both compile to IL, you can handle problems that ask for a functional approach functional and use those solutions very easily in your procedural code.
In that way functional code can easily find its way in a production environment a bit at a time
Therefore, and since the userbase of MS is that big, my guess is that if F# will not catch on in the very near future, that Haskell won't either.
I think it's worth the struggle. It will help you to understand how problems are solved and not only how a computer works.
Maybe one particular problem is Haskell itself - As a purely functional language, it's kinda "hardcore" which may on the other hand even complicate things.
Functional programming instead may be extremely useful in a very pragmatic manner - Many OO/imperative languages have now included functional elements for this reason (Linq, anonymous functions, readonly values, function pointers/delegates, type-inference): You can concentrate on what should be done which allows you to express more in less code (that is even less error-prone).
Non-purely functional languages (standard functional languages) like Scala or F# can be integrated easily into existing Java or .NET-projects, so you can combine the benefits of both paradigms where they are needed. For typical advantages of functional languages, see this thread. Just think of extremely powerful parsing (Monadic parser combinators / Parsec) or concurrent programming that is possible with functional languages and you'll see how useful they are.
Broadening your horizons helps you be a better programmer no matter what language you happen to be using at the moment. You'll never look at programming the same way after you've written Lisp macros, for instance. After you begin to think in Haskell terms, you'll find yourself composing functions and wishing for closures in less advanced languages.
Judging from goodies in C# such as lambdas, type inference, closures, and so on, learning Haskell will give you a leg up on tomorrow's cutting edge in mainstream languages.
Some people enjoy programming in Haskell. If you can choose your environment, and enjoyment is a consideration, then maybe you should hop in.
Many programmers are not in position to choose their tools and enjoyment is not a factor for their choices. Many of them get to use C/Java/etc at their workplace for the "core project source", but then also choose or need to use Python for "scripts" such as build-scripts with SCons, other scripts that generate Java/etc code, testing systems, proofs-of-concepts, etc.. And in other places Python is also used in the "core project".
In 8 years, it will be Haskell, not Python, which will be "coming to you". But you can come to it sooner.
You can combine the use of functional programming and be pragmatic about the language.
All modern scripting languages s.a. JavaScript or Lua allow use of the functional paradigm.
The functional concept is coming on strong. Note the flurry of activity and interest around Ruby. I've also noticed a bit more interest in JavaScript beyond a mere browser scripting language lately. You can get ahead of the game by diving in now, though the time invested might not pay off this year or next.
It depends on your general game plan. Are you into programming as an end in itself or as a means to an end? If it's the former, go nuts with Haskell. If the latter, stick with mainstream, "employable" languages. Wait for Haskell to take off and then pounce.
Why procedural and not Object Oriented, not seen procedural being used for many years apart from C.
Commercially speaking. I would go with Java or C#. Doesn't really matter which they both pay well and the skills are interchangeable with other like minded languages such as python, Ruby and JavaScript.
Haskell is worth the time and effort, although it is very academic, some banks use it, although many in Europe and the UK are moving the code base over to F#.
I don't think FOP will be moving at great speeds commercially speaking. But the techniques are definitely making an appearance in the main stay languages. Especially with Multi-Core chip designs and making code run parallel on them.

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