Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All sorts of interesting stuff and then...

... OOP is inherently less useful that FP ...

Is it that hard to see different uses for different languages? Original BASIC was neither OO nor FP and came after both. Still it satisfied a particular need. C++ is the worse programming language in the world, except for all the others - in the domain it is used in.



>Is it that hard to see different uses for different languages?

Okey. How about language that could encompass all of them? The thing about such language is that it have to be functional one, at the core. Be it Lisp, or Haskell, or Agda2.

Let's look at Haskell. It has OO: http://homepages.cwi.nl/~ralf/OOHaskell/ Everything in mainstream OOP languages and then some, all in Haskell type system. It has BASIC: http://hackage.haskell.org/package/BASIC

I embedded to Haskell a MIPS assembler, a language to describe CPU cores, and some other things.

I am not an expert in Lisp, but an avid reader of HN should know that it pretty good in encompassing languages.

As for C++, it's domain shrinks every year.


Uh certainly, FP language are certainly the most powerful and flexible languages, aside from maybe logic languages, far beyond OO. FP language definitely encompass more, you are correct there.

I just think it's important to not to confuse power and flexible with usefulness. Rigidity and limits have their uses.

As far as c++ goes, it's market share shrinks every year yet since the market grows and c++'s share began huge, c++ gains more users and more market position every years than the total users of functional programming languages. That may change in the future. FP will have to show its usefulness and not only its power and flexibility for this to happen.


As for C++, it's domain shrinks every year.

Mobile seems to be generating a resurgence of interest in C++. Squeezing every last bit of performance out of tightly constrained CPU and RAM matters again.


So surely Forth should make a resurgence, it has the most code density, the fastest runtime and the lowest error rate.

The only metric is loses on is its high score in impenetrability.


Actually, you don't need a Forth implementation to benefit from compact code. Take a look: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.3...

They split program into slow and fast parts, slow parts used compact byte-code interpreter, fast parts were compiled into native code with optimizations.

They didn't used "code compression" like Forters do - Forters refactor common pieces of code into separate definitions. Nevertheless, they made quite balanced system.


thanks




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: