4 ms·
>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 tha
by thesz 15y ago
>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/ 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 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.
- joe_the_user 15y agoUh 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.
- cageface 15y agoAs 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.
- dramaticus3 15y agoSo 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.
- thesz 15y agoActually, 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.3758 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.
- dramaticus3 15y agothanks