Hacker News new | ask | show | jobs
by pavelludiq 5319 days ago
You wonder what would happen if we all wrote C++ on Windows? I hope you can answer that question yourself :).

But seriously, i think its great that we can all work in our favorite language, and we can get away with it. I can write a web service in common lisp, and you can use it in your Rails cat picture app, that also uses a brainf*ck script to convert the cat pictures in a suitable format. And your company can also write an iPhone version of your app in objC and a desktop version in C++ for windows and Linux. Man, protocols are awesome :)

1 comments

It's just a thought. A "what if".

I trace the existence of many languages to having no common instruction set in hardware.

Different assembly languages for different hardware. This was very frustrating for people many years ago.

If protocols (rules) are awesome what if we had had a protocol that asked the chip makers to use a common (extendable) instruction set for all hardware? What if there had only been one assembly language?

It seems that all abstractions, from Pascal or Lisp virtual machines to C to higher and higher level languages to the ones popular today, are all descended from the search for a way to deal with that initial lack of protocol (rule) to get hardware makers to use the same instruction set and thereby let programmers use the same assembly language.

I could be very wrong on this.

> It seems that all abstractions, from Pascal or Lisp virtual machines to C to higher and higher level languages to the ones popular today, are all descended from the search for a way to deal with that initial lack of protocol (rule) to get hardware makers to use the same instruction set and thereby let programmers use the same assembly language.

Maybe I am misunderstanding this.

But Lisp and C derives from very different views of the underlying machine. It is rather hard to unify a lisp machine (or other lambda calculus machine) instruction set with the instruction set assumed by a language like C. Even assuming extensibility of the instruction set, constructing a machine that can execute both the "usual" instruction set and lambda calculus efficiently is very very hard.

So this may not really be practical.

So with Lisp or even Forth, the proper approach would be to have "Lisp chips" or "Forth chips" (which were recently discussed here)?
Even if there was One True Assembly, few would want to program in it directly, and we would still have different ideas about how to generate it. There would still be functional people and OOP people and procedural people. There would be tradeoffs where different approaches would be objectively better.

I would like a One True Assembly because it would make it easier to develop new languages. :)

I guess this is kind of what is happening in the browser at the moment.