On 24/10/2010 00:46, bearophile wrote:
Walter:
As we all know, tool support is important for D's success. Making tools easier
to build will help with that.
To that end, I think we need a lexer for the standard library - std.lang.d.lex.
It would be helpful in writing color syntax highlighting filters, pretty
printers, repl, doc generators, static analyzers, and even D compilers.
This is a quite long talk by Steve Yegge that I've just seen (linked from
Reddit):
http://vimeo.com/16069687
I don't suggest you to see it all unless you are very interested in that topic.
But the most important thing it says is that, given that big software companies
use several languages, and programmers often don't want to change their
preferred IDE, there is a problem: given N languages and M editors/IDEs, total
toolchain effort is N * M. That means N syntax highlighters, N indenters, N
refactoring suites, etc. Result: most languages have bad toolchains and most
IDEs manage very well only one or very few languages.
So he has suggested the Grok project, that allows to reduce the toolchain
effort to N + M. Each language needs to have one of each service: indenter,
highlighter, name resolver, refactory, etc. So each IDE may link (using a
standard interface provided by Grok) to those services and use them.
Today Grok is not available yet, and its development is at the first stages,
but after this talk I think that it may be positive to add to Phobos not just
the D lexer, but also other things, even a bit higher level as an indenter,
highlighter, name resolver, refactory, etc. Even if they don't use the standard
universal interface used by Grok I think they may speed up the development of
the D toolchain.
Bye,
bearophile
Hum, very interesting topic! A few disjoint comments:
(*) I'm glad to see another person, especially one who is "prominent" in
the development community (like Andrei), discuss the importance of the
toolchain, specificaly IDEs, for emerging languages. Or for any language
for that matter. At the beggining of the talk I was like "man, this is
spot-on, that's what I've said before, I wish Walter would *hear* this"!
LOL, imagine my surprise when I found that Walter was in fact *there*!
(When I saw the talk I didn't even know this was at NWCPP, otherwise I
might have suspected)
(*) I actually thought about some similar ideas before, for example, I
thought about the idea of exposing some (if not all) of the
functionality of DDT through the command-line (note that Eclipse can run
headless, without any UI). And this would not be just semantic/indexer
functionality, so for example:
* DDoc generation, like Descent had at some point
(http://www.mail-archive.com/[email protected]/msg02734.html)
* build functionality - only really interesting if the DDT builder
becomes smarter, ie, does more useful stuff than what it does now.
* semantic functionality: find-ref, code completion.
(*) I wished I was at that talk, I would have liked to ask and discuss
some things with Steve Yegge, particularly his comments about Eclipse's
indexer. I become curious for details about what he thinks is wrong
about Eclipse's indexer. Also, I wonder if he's not conflating "CDT's
indexer" with "Eclipse indexer", because actually there is no such thing
as a "Eclipse indexer". I'm gonna take a better look at the comments for
this one.
(*) As for Grok itself, it looks potentially interesting, but I still
have only a very vague impression of what it does (let alone *how*).
--
Bruno Medeiros - Software Engineer