Live data from Hacker News

Advanced programming languages

matt.might.net

11–20 of 76 posts

Re: Advanced programming languages

#11

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 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 suggest that everyone should use them all the time.

There are more important things than having an expressive language, I use allot of Java which is seriously non expressive in many ways but I have more confidence in it to solve the category of problems I deal with than any other language that I have tried thus far.

Re: Advanced programming languages

#12
post #9

Earlier quoted context omitted.

since a large amount of programming is all about state and side effects IANA web developer, but... Doesn't web development typically put state into a database system instead of the scripts the server runs to generate the requested pages? It seems reasonable enough to have a function that takes a page request as input, calls some other functions to look up info from the database, then constructs and returns a page and…

You can do allot with a database sure but sometimes you want multiple transactions within a single request and data will change between them. You may also take input from other sources than a database such as flat files, web APIs emails etc and need to do a bunch of processing between them. Not to mention if you are using Comet or something where you hold a request open for a long time and push and pull allot of data…

sometimes you want multiple transactions within a single request and data will change between them

Is this an issue with race conditions, or with alternating between reading and writing the state during a single request, or both, or something else entirely?

You may also take input from other sources than a database

This doesn't seem like it should make a difference: you write a function to get the necessary data from whatever source, then call that function in the page request handler (OK, yes, I/O is technically a side effect).

I agree that the processing you do with that data might require some significant rethinking, depending on how it was written/planned out before (sure, state-passing style is always there, though I don't enjoy doing it... really though, I've found that a lot of what I was used to doing imperatively is not all that awkward to do functionally).

Not to mention if you are using Comet or something where you hold a request open for a long time and push and pull allot of data some of which may not be persisted immediately.

What's the conventional way to do this in an imperative language?

Re: Advanced programming languages

#13
I agree with this article but I have to admit I'm tired of learning programming languages after a number of years in this industry. I've had gigs in just about everything and now I'm purposely restricting my efforts to just a couple different languages even if there is money on the table for work in something else.

You can do just about everything in any mature language - after a while of so to say exploring the landscape for a number of years, its nice to just become deeply fluent in a couple of things. I know people love to talk about this language vs that and how language X will make you rethink everything and usually there is some truth to it but in the big picture its usually pretty trivial in terms of actually getting stuff done.

Re: Advanced programming languages

#14
post #3

Earlier quoted context omitted.

Any advanced language worth his salt will allow you to link libraries from other languages. It may require some work, but at least it can be done; whilst you can't expand the capabilities of your programming language of choice as easily. I think no language is advanced enough to be used alone for everything. Steve Yeggie said that once a time at Amazon the only languages allowed were Lisp and C. It makes sense: an hi…

Wow! I never knew that Amazon was a Lisp company. I'd like to know more about their infrastructure setup with Lisp and C.

I don't have any info besides Yeggie saying it.

Re: Advanced programming languages

#15

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…

Galois is a company which uses functional languages, mainly Haskell if I'm not mistaken: http://corp.galois.com/

If I'm not mistaken, Jane Street is another functional programming shop: http://www.janestreet.com/

These are companies using OCaml: http://mirror.ocamlcore.org/wiki.cocan.org/companies.html

Re: Advanced programming languages

#16
My biggest desire to learn a language like Haskell or Scala would be the total shift in thinking required to grasp the language (the author mentions this). I've started playing with clojure lately and even though I've barely scratched the surface (primarily poking around 4clojure.com) I could already feel my brain twisting in ways I've never experienced before. I firmly believe once you turn that corner and really start to get it, you start seeing and attacking problems in such a different light that there's no going back. The big problem I've had recently is finding the motivation to learn anything outside of work (programming/engineering related at least); once you start getting paid to do something its really hard to do it for free, haha.

Re: Advanced programming languages

#17

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 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 don't know how far over to the functional paradigm arc leans but hacker news is programed in it.

HN doesn't look as an outstanding piece of software.

Re: Advanced programming languages

#18

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…

I appreciate your interesting comments, but just FYI, it's "a lot" not "allot". I wouldn't normally point out a spelling error but I noticed it enough to be distracting and thought you might not know (in case of ESL).

Re: Advanced programming languages

#20

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'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."

Haskell isn't about avoiding side effects. It's about managing them.

Seriously, it's time to drop this criticism. Obviously Haskell can "do things". It may not have thousands and thousands of apps of every type, but when it has an X window manager, a DVCS, and a few web frameworks under its belt, it clearly isn't about "not having side effects". (Nor is that a complete list; my point is that is sufficient evidence to show that things can be done, not a complete app list.)

Every functional language you've ever heard of has reasonably serious apps, but I'm not sure there's one yet where you won't encounter at least one of 1. a tooling problem (Erlang, Haskell) or 2. an impedance mismatch between the tooling and the language (Scala, Clojure). Time is correcting this problem rapidly, but if you don't feel like being on the cutting edge (and that's a fine position to take), I wouldn't push them on you. (But I would say that all four of those languages I mentioned are indeed the cutting edge and have come off the bleeding edge. Real work can be done in them if you stick to their strengths, but you may hit some bad error messages, or road blocks you'd normally just download your way around.)

Post reply on HN