emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs contributions, C and Lisp


From: Perry E. Metzger
Subject: Re: Emacs contributions, C and Lisp
Date: Tue, 6 Jan 2015 14:39:33 -0500

On Tue, 06 Jan 2015 13:24:44 -0500 Richard Stallman <address@hidden>
wrote:
> [[[ To any NSA and FBI agents reading my email: please consider
> ]]] [[[ whether defending the US Constitution against all
> enemies,     ]]] [[[ foreign or domestic, requires you to follow
> Snowden's example. ]]]
> 
>   > > With all due respect, it is so important to avoid the full AST
>   > > that I'm not going to give up on it just because someone
>   > > claims that is necessary.
> 
>   > What would you need to know or hear to make up your mind on this
>   > issue?
> 
> I'd like to see an investigation that establishes just what data is
> needed for each purpose.

Say you want to do a global refactoring of a function that alters the
parameters it takes -- the sort of thing modern IDEs do very
well. You can't do that very effectively without the AST. Moreover,
say you want to globally find all instances where a particular
function's return is not tested for NULL and have the user manually
check that they're not bugs -- this is the sort of thing modern
development tools can do, and which you can't do without an AST.

The Go programming language, during its development phase, relied
heavily on a tool that updated old APIs and syntactic conventions
into new ones to permit the code base to be modified constantly from
old to new when serious changes were made to the language and its
libraries.

Those are pretty straightforward -- there are far more remarkable
sorts of high level refactorings that now get done pretty
straightforwardly with AST aware tools. The guys at Google who build
a bunch of the LLVM libAST stuff have demos of doing very serious C++
refactorings in which large amounts of code gets rewritten to
accommodate new paradigms.

Programmers like programmable tools. That's one of the reasons Emacs
is so successful. Being able to program your editor to do massive
transformations of your source code is a really cool thing -- Emacs
could actually be far better at this than XCode, Eclipse and all the
rest if it could actually get access to AST information.


Perry
-- 
Perry E. Metzger                address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]