Hacker News new | ask | show | jobs
by pmarreck 3665 days ago
I want to suggest looking at a language like Erlang/Elixir that didn't start out from corporate self-interest (i.e., was open-source from the get-go) but a rising functional tide floats all boats. (And besides, Elixir "borrowed" a few good ideas from F#.)

I've had nothing but good experiences during my forays into functional langs. Here's to a more functional, immutable, easily-concurrent, easily-unit-tested future

4 comments

As commented by others, F# was part of Microsoft Research, and not taken up by MS or other corporations when it was started.

Erlang started out in Ericsson, a corporation. Elixir and LFE (Lisp Flavored Erlang) started out opensource and are still opensource.

The term 'corporate self-interest' seems misplaced here, with the parenthetical remark turning it into the antonym of 'open-source'. The term proprietary, commercial or close-sourced seem more neutral and correct.

Erlang started inhouse at Ericsson, like F# did at MS Research, except it was for a company's immediate business needs or 'self-interest' to program their telecomm switches.

Elixir grew out of one person's frustration with Ruby's concurrency (Jose Valim), and a desire to have what Erlang offered him along with the BEAM VM and OTP. It has Ruby-like syntax, Jose is a popular Rubyist, and great tooling along with some other functional structures Jose added that he thought were missing in Erlang. [2]

Pony is an OO, actor-based, open source language, yet it has a lot of corporate pickup from fintech and others, and it seems to be getting ready to shove Erlang/Elixir/LFE aside on concurrency and speed. It has fully-concurrent garbage collection that doesn't use the "poison pill" message approach to kill all actors.

The creator of Pony, Sylvan Clebsch, has one foot in academia, and the other in business. He has worked on fintech, milsims, and games. [3]

[1] http://www.ponylang.org/

[2] https://www.sitepoint.com/an-interview-with-elixir-creator-j...

[3] http://www.curry-on.org/2015/sessions/pony-making-it-easier-...

I agree with everything here except for the Pony promotion because after working on OO codebases for 15 years now, I am mostly convinced that OO has fundamental design flaws, at least when it comes to the long-term scalability and maintainability of codebases.

Unfortunately it is difficult to "prove" this definitively currently, until someone comes up with a "complexity polynomial metric over time" for code, except to talk to old programmers like myself (44) who have done this for a long while and gotten disillusioned due to all the time spent repairing OO complexity/tech debt bugs, and have become entranced by functional langs and the way they avoid inheritance, use immutable values and are super careful with state, all of which contributes to better long term code life

Fortunately I'm not the only old OO guy proclaiming this, I have John Carmack on my side:

http://www.gamasutra.com/view/news/169296/Indepth_Functional...

"My pragmatic summary: A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states their code may execute in. In a multithreaded environment, the lack of understanding and the resulting problems are greatly amplified, almost to the point of panic if you are paying attention. Programming in a functional style makes the state presented to your code explicit, which makes it much easier to reason about, and, in a completely pure system, makes thread race conditions impossible."

"No matter what language you work in, programming in a functional style provides benefits. You should do it whenever it is convenient, and you should think hard about the decision when it isn't convenient."

I heartily agree with what you have said. It is the reason I am not really biting at Pony. Maybe if I needed everything else it offered, or fully understood everything else it offered?

The problem I see now is that the entire functional domain is so spread out - Clojure, F#, OCaml, Haskell, Idris, Erlang/Elixir/LFE, and even the APL/J/K/Q crowd and Java's attempt to go functional. I'm not complaining about the number of functional languages to choose from, which is good. It's whether there will be enough critical mass in any one of the functional languages given a new non-functional language popping up every week. I don't know.

Now that MS has opensourced so much, and Xamarin's stuff is free, F# is looking better to me (again).

I also find myself dropping to C. C was my third language (after 6502 assembly and CPM Basic). Haskell/Idris/Elm are my toys of the year. I never fully dove into Haskell, but the concise, readable and very mathematical syntax agrees with my sensibilities.

Old! I'm 52, but I didn't stay with programming for a living, so my age doesn't reflect my programming experience. I did start with a CPM PET in 1978/79, but then went on years later to do other things.

F# comes from Microsoft Research and was notoriously ignored by the corporate side for years (and still is to some extent). So I'm not sure F# has really ever been a project of Microsoft corporate interest, and now there is the F# Foundation which has many non-MSFT people and companies involved.

While I like Erlang a lot, I'd say that Ericsson still has quite a bit of corporate control and interest. It's not always a bad thing to have companies involved in the success and advancement of technology.

If you wanted something like F# that isn't backed by Microsoft, I would suggest OCaml, which is what F# is.
I've looked at it and it looks nice indeed. Having BEAM underneath is a big plus.

However, dynamic typing turned me off. Whole my life I'm working with statically typed languages and heavilly rellying on compiler / type system to catch my mistakes / guide my design. Hard to give up on that.