Live data from Hacker News

Advanced programming languages

matt.might.net

41–50 of 76 posts

Re: Advanced programming languages

#41
post #34
post #32

Earlier quoted context omitted.

Programming language research is a very large and deep field, though a lot of industrial languages are fairly divorced from it. All of these languages have a strong theoretical foundation. This pays off well. One common statement from ML programmers is "If it compiles, then it works." http://en.wikipedia.org/wiki/Programming_language_theory

>Programming language research is a very large and deep field I agree with you. But to play devils advocate, if its so large and deep, why do I only hear about Haskell and Scala when language-geeks talk about "advanced" programming languages? Looking at the wikipedia link you provide, there's a list of bullet points by decade: 7 things worthy of a bullet in the 60's, 7 in the 70's, 4 in the 80's, 2 in the 90's and 0…

Really? Haskell and Scala are sooo last century. Look up Agda or Epigram. ;-)

Seriously, though, it takes time. Lisp had higher-order functions and garbage collection long before they became mainstream. The type systems used in OCaml and Haskell were discovered in the 70s. Maybe in 10 years we'll see what of the 90's ideas become really valuable (or crappy but mainstream...).

Re: Advanced programming languages

#42

Earlier quoted context omitted.

I agree that you can vastly reduce state is a large number of cases. It just seems strange to write in a purely functional language when there are many languages out there that combine functional style with the ability to write in an imperative way. I can quite happily write programs in python without any real side effects, indeed as you suggest I usually try and divide my functions between those which have side effe…

The advantage is that you can reason about the correctness of code. Sure, if you write an entire code base depending on its size you may be able to reason about all the side effects in your head. But when moving to a larger project, or one developed by a team - all bets are off. It is really important to have the effects embedded in the type system. Even with a large test suite. On top of this, having professionally…

Interesting, my question is more though why now? Since LISP has been around for a very long time and FP has had very little mainstream interest until the last year or 2.

Re: Advanced programming languages

#43

All the languages he suggests apart from Scala are or are pretty close to being pure functional languages. I'm not convinced that I would be more productive developing say a web app , database app or game using say Haskell rather than Java or Python especially since a large amount of programming is all about state and side effects. I'm not against learning a pure functional language as a way to improve your programmi…

I think you may argue that some languages are in practice more or less pure by how much they encourage/enable avoiding mutability and side effects but of the 4/5 languages he discusses I'm pretty sure only haskell is purely functional. Scala Scheme and SML/ocaml are all impure functional that allow mutability/side effects. (Scala is considered an object functional hybrid by some and an object oriented language dressed as functional by others - try to avoid flamewar).

Some Examples: I think Twitter uses Scala(see above) for a number of their back-end services (see http://blog.redfin.com/devblog/2010/05/how_and_why_twitter_u...). Foursquare uses scala at least on the front end http://news.ycombinator.com/item?id=1139062 . This page has a few other big success http://www.scala-lang.org/node/1658.

Haskell has pandoc(http://johnmacfarlane.net/pandoc/) a cmdline tool to convert beetween markup formats(also a library with binding to several languages) I think it supports a wider range of formats/fidelity then alternatives.

Ocaml: MLDonkey is an open source eDonkey2000 client Coq – a interactive theorem prover.

Ocaml

Re: Advanced programming languages

#44

Earlier quoted context omitted.

I don't know how far over to the functional paradigm arc leans but hacker news is programed in it. I know it's built off common lisp so there is that linage. The naughty dog game studio used a form of lisp in their games starting with Crash Bandicoot until they got purchased by Sony(I think). Though, the language was much more imperative in nature instead of functional. Autocad had autolisp built into it. http://en.w…

I wonder if the lack of state is why I keep getting the "Unknown or expired link" message all the time? I see allot of functional DSLs (Excel for example + autocad as you pointed out). Was crash bandicoot written in Lisp or was this just an internal DSL used for certain operations? I don't have anything against functional languages and I'm sure all good developers should know at least 1 but the article seems to sugge…

You get that message fairly often because the implementation uses continuations (http://en.wikipedia.org/wiki/Continuation). This is one functional style for making a stateless protocol (HTTP) into a stateful one. HN could use a different design (one with less state) and avoid these issues with a few different trade-offs. This is an implementation detail rather than something specific to FP vs. non-FP. Also, best I can tell, HN still stores all of its data in flat files rather than a traditional datastore.

Re: Advanced programming languages

#45

Earlier quoted context omitted.

The advantage is that you can reason about the correctness of code. Sure, if you write an entire code base depending on its size you may be able to reason about all the side effects in your head. But when moving to a larger project, or one developed by a team - all bets are off. It is really important to have the effects embedded in the type system. Even with a large test suite. On top of this, having professionally…

Interesting, my question is more though why now? Since LISP has been around for a very long time and FP has had very little mainstream interest until the last year or 2.

Good question. I think its a couple of diffrent things.

1. Java is not really evolving, people are frustrated

2. Multicore is difficulte and FP claim they are better at it.

3. Complexety of ever bigger codebases

4. Java Script not longer the worst language in the world, people start to understand whats powerful about it and want to know what more is possible.

Re: Advanced programming languages

#46
post #36

>In academic research and in entrepreneurship, you need to multiply your effectiveness as a programmer, and since you (probably) won't be working with an entrenched code base, you are free to use whatever language best suits the task at hand. I disagree. If you're a startup, you're better off using a more mainstream language. I'm from India and if I start to find a good Haskell or Scala programmer I'll be looking for…

Is it really so hard to take existing talent and train them to use other languages? Especially in cases where the existing library and tooling ecosystems exist (e.g. anything based on the JVM) the actual language probably won't be a show stopper for the level of talent you need. If a new language takes a couple weeks to get up to speed in, so what? The bigger problem, IMO, is the existence of libraries and basic development tools like build systems and dependency management. I'm fairly pleased with how many of the newer languages that build on the JVM allow easy interop so that you can use the existing ecosystem when it makes sense.

Re: Advanced programming languages

#47
post #36

>In academic research and in entrepreneurship, you need to multiply your effectiveness as a programmer, and since you (probably) won't be working with an entrenched code base, you are free to use whatever language best suits the task at hand. I disagree. If you're a startup, you're better off using a more mainstream language. I'm from India and if I start to find a good Haskell or Scala programmer I'll be looking for…

Infinetly Beta would disagree.

Re: Advanced programming languages

#48
post #36

>In academic research and in entrepreneurship, you need to multiply your effectiveness as a programmer, and since you (probably) won't be working with an entrenched code base, you are free to use whatever language best suits the task at hand. I disagree. If you're a startup, you're better off using a more mainstream language. I'm from India and if I start to find a good Haskell or Scala programmer I'll be looking for…

> I'm from India and if I start to find a good Haskell or Scala programmer

In general, if you need to find a good programmer for any language (Python, JavaScript, Java, ...), you will be searching for a long time. The only difference is that with Haskell, OCaml and other advanced languages, usually the first programmer you will find is already very good.

Re: Advanced programming languages

#49
post #36

>In academic research and in entrepreneurship, you need to multiply your effectiveness as a programmer, and since you (probably) won't be working with an entrenched code base, you are free to use whatever language best suits the task at hand. I disagree. If you're a startup, you're better off using a more mainstream language. I'm from India and if I start to find a good Haskell or Scala programmer I'll be looking for…

I disagree (again). If you are a technology focused startup, chances are you are looking for highly talented people for your core team. You usually don't want the average PHP or Java Joe; you want more! And those you are looking for are usually not afraid to learn learn yet another language, if they don't already know. On the other hand if you are not building a technology focused startup, but simply need some software as a vehicle to drive the main business, you are right to look at the cost-benefit analysis and choose a more mainstream language, for which you can find cheap and easily replaceable labor in your area.

I'm not saying you can't get the job done in a mainstream language; but I postulate that the mindset and attitude towards code of a good Haskell or Scala programmer is vastly different from your less expensive PHP or Java programmers. Some want to push the limits of what's technologically possible and others just want their paycheck by the end of the month; they are in both camps; are they evenly distributed?

Re: Advanced programming languages

#50
post #36

>In academic research and in entrepreneurship, you need to multiply your effectiveness as a programmer, and since you (probably) won't be working with an entrenched code base, you are free to use whatever language best suits the task at hand. I disagree. If you're a startup, you're better off using a more mainstream language. I'm from India and if I start to find a good Haskell or Scala programmer I'll be looking for…

Is it really so hard to take existing talent and train them to use other languages? Especially in cases where the existing library and tooling ecosystems exist (e.g. anything based on the JVM) the actual language probably won't be a show stopper for the level of talent you need. If a new language takes a couple weeks to get up to speed in, so what? The bigger problem, IMO, is the existence of libraries and basic deve…

>Is it really so hard to take existing talent and train them to use other languages?

This will go into the costs column, and the reasons you use that particular tech. stack will go into benefit column. Weights and values are fairly subjective for each of the rows in the two columns and is very case specific.

What I wanted to point out was that there are a lot of factors to consider while choosing your tech stack, be it for academia, research, startup or enterprise. I disagree with this following statement:

>, and since you (probably) won't be working with an entrenched code base, you are free to use whatever language best suits the task at hand.

Size of the codebase is not the only criterion. (And to be fair to the author of this article, "task at hand" envelopes a lot of the other criteria).

PS: I found a good debate between Ryan Allen[1] and Michael Wales[2] debating the criteria on which to choose PHP or Ruby, a lot of them can be translated to a general tech stack choice. I've submitted it to HN here[3] and direct link here [4].

[1]http://twitter.com/ryanfaceryan

[2]http://twitter.com/walesmd

[3]http://news.ycombinator.com/item?id=3446180

[4]http://net.tutsplus.com/articles/general/language-war-php-vs...

Sorry, if the link was already posted on HN sometime in the past.

Edit: Formatting

Post reply on HN