Hacker News new | ask | show | jobs
by charlieflowers 4570 days ago
I sort of agree with you, but I'd tweak it a little. I think we need to move to a situation where we refuse to use languages unless they offer "compiler as a service." Ideally, this would be open source for each programming language.

As a result, every developer wouldn't need to know how to write a parser/compiler, but rather would need to master the usage of the API the compiler-as-a-service offers. (For example, imagine JetBrains Idea for Java or Resharper for C# as a suite of open source, api-driven libraries).

Then, we could have IDE's with all kinds of features. In addition, we could write programs that transformed or modified our code bases.

This lets the "hard work" of compiler/parser building be centralized to a few developers, but spreads the benefits around to most everyone.

Since this is already happening in some languages (JetBrains, what Google is doing with clang for C/C++, and apparently Rosyln from Microsoft), it seems like only a matter of time before its power becomes apparent and it becomes a requirement for a language to be taken seriously.

I see no reason why Python and Ruby couldn't expose the compiler's AST as a service as well (obviously it would be limited by metaprogramming and dynamic typing ... perhaps in those cases we'd need "interpreter as a service" ... hmmm).

1 comments

>As a result, every developer wouldn't need to know how to write a parser/compiler, but rather would need to master the usage of the API the compiler-as-a-service offers. (For example, imagine JetBrains Idea for Java or Resharper for C# as a suite of open source, api-driven libraries). >Then, we could have IDE's with all kinds of features. In addition, we could write programs that transformed or modified our code bases. >This lets the "hard work" of compiler/parser building be centralized to a few developers, but spreads the benefits around to most everyone.

Oh no you are not wriggling out of that one. Every developer should know how to write a parser and a compiler, not full fledged ones, just enough to implement a small language. That is in essence what computing is about, composing and instantiating formulae, with a full grasp of its semantics. To call your self a computing professional without knowing about parsing is like calling yourself a medical professional without knowing anatomy. This can only happen in the world of computer programming. It is the very essence of what we do, and how such a situation exists is an indictment of the computing profession, its educationists and educators.

It is the very soul of computing.

We might get away with it in the eyes of the public who don't know better because we produce the results they want, internally we shouldn't kid ourselves.

Ok, ok. If you want to define that as your minimum requirement, that's fine. I don't agree, but I'm sure many do. I know how to write a parser and a compiler anyway, so it doesn't step on my toes directly.

What I really meant to say was, everyone would not need to actually write a compiler/parser (regardless of whether they know how to or not). To achieve the goal of having a bunch of nice new IDE features, we don't need everyone writing parsers and compilers. We can achieve that goal by having a few developers write really good compiler-as-a-service offerings.