www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: IDEs (Was: Mainstream D Programming)

reply Bruce Adams <tortoise_74 yeah.who.co.uk> writes:
Robert Fraser Wrote:

 Janice Caron Wrote:
 
 On 10/14/07, Ary Manzana <ary esperanto.org.ar> wrote:
 Please tell me the steps you perform to do the refactor... Say, for
 example, you are renaming the name of a method of class A, and suppose
 there is another class B with the same method name (but you don't want
 to change B's method's name).

Change the method name, then recompile. The compiler will find all the references using the old name, because they are now compile errors. Obvious!

That works, but on an enterprise codebase where there could be 100+ references to that method, this becomes tedious.

grep -l "error message" | xargs mysearchandreplacefoo.sh mysearchandreplacefoo.sh #!/bin/sh for FILE in $*; do sed -e s/<oldName>/<newName>/g < $FILE > $FILE.tmp cp $FILE.tmp $FILE done Insert favourite scripting language foo in place of ugly old-fashioned Bourne shell. There's not much more than that going on under the hood of a lot of these fancy IDEs anyway. Okay the syntax awareness makes it a hell of a lot less ugly.
 I think the point is that IDEs, while not essential, can certainly do a lot of
things that are helpful. For example,
 

 * Show exactly where in a huge string mixin an error occurs

Maybe the design would be better if the mixin were broken down into brain size chunked chunks.
 * Show the particular instantiation of templates
 * Manage imports automatically, so whenever it comes across an >undefined
symbol, you just need to press a button to import the >required module, not
look up what module it's in, etc. Never write >another import statement! This
could also improve code quality, since >you could make it only use selective
imports and never pollute your >namespace by importing an "all" module.

You still have to read the documentation to know what other functions it interacts with. Otherwise you might end up mixing printf's and couts using the facilities of two libraries where one might suffice. That said. Having some kind of hypertext link to the documentation is really helpful.
 * Mark errors instantly (and have suggested fixes for some of them), rather
than having to compile every time.
 * Automatically implement stubs for inherited abstract methods/interfaces.
 * Track TODOs, etc.
 * Show formatted Ddoc on hover.
 * Integrate debuggers to visually step through code.
 * Format source code
 * Autocomplete
 * Go-to definition (even across files)
 * Additional warnings and static analysis if you want them (for example, it
could warn for "x == null" or integrate Coverity-like nulll checking)
 * Automatically organize/sort source code
 * Generate an interface or abstract superclass from the intersection of one or
more classes' methods.
 * A "use supertype where possible," where all references to a subtype are
changed to references to the supertype if they can be (encourages more modular
code in a highly OO system).
 * Change "auto" to its actual type.
 * Move functions/classes between modules and automatically update modules that
reference them.
 ...

The real power of an IDE comes through being able to script it. This is what made emacs such a success.
 
 Anyway, the point is not that "an IDE is essential," and for smaller projects,
it's arguably overkill, but for huge projects, it can be helpful.
 
 I think one of the things stopping a lot of people from adopting IDEs >is this
implicit fear of having to learn something new. There is a >learning curve
associated with everything, and if you've been using >ed for the last 30 years,
an IDE can be a scary place.

Its also about changing IDEs. When your own your own system you can usually pick whatever IDE suits you best but even in the 21st century, though it sickens me I occasionally find I have to use vi. I hate vi. vi is an abomination. It just happens to be the lowest common denominator sometimes. Your point also gets us back on topic as using D versus using C or C++ for the last X years is even more daunting a transition. Regards, Bruce
Oct 15 2007
next sibling parent reply David Brown <dlang davidb.org> writes:
On Mon, Oct 15, 2007 at 07:31:16PM -0400, Bruce Adams wrote:

Its also about changing IDEs. When your own your own system you can
usually pick whatever IDE suits you best but even in the 21st century,
though it sickens me I occasionally find I have to use vi. I hate vi. vi
is an abomination. It just happens to be the lowest common denominator
sometimes. 

Every single line of 'D' code I have ever written has been within vim. In fact, nearly every line of code in any language I've ever written in the past 10 years or so has been in vim. Before that, it was emacs, before that vi, and before that teco. Modern versions of VIM do many of the things people think you need an IDE for. Even this email is composed in vim. All this really shows is that there is a lot more to what one is used to, and personal preference than people give credit to. David
Oct 15 2007
next sibling parent Bruce Adams <tortoise_74 yeah.who.co.uk> writes:
David Brown Wrote:

 On Mon, Oct 15, 2007 at 07:31:16PM -0400, Bruce Adams wrote:
 
Its also about changing IDEs. When your own your own system you can
usually pick whatever IDE suits you best but even in the 21st century,
though it sickens me I occasionally find I have to use vi. I hate vi. vi
is an abomination. It just happens to be the lowest common denominator
sometimes. 

Every single line of 'D' code I have ever written has been within vim. In fact, nearly every line of code in any language I've ever written in the past 10 years or so has been in vim. Before that, it was emacs, before that vi, and before that teco. Modern versions of VIM do many of the things people think you need an IDE for. Even this email is composed in vim. All this really shows is that there is a lot more to what one is used to, and personal preference than people give credit to. David

vim is a better vi. I'm talking vanilla vi when I say I hate it. I don't really like vim either but I appreciate the syntax highlighting. You did say one thing that shocked me however. You switched from emacs to vim. I would have though the switch would be the other way around. What were the motivating factors? Regards, Bruce.
Oct 15 2007
prev sibling parent TomD <nospam anymo.re> writes:
David Brown Wrote:

[...]
 Every single line of 'D' code I have ever written has been within vim.  In
 fact, nearly every line of code in any language I've ever written in the
 past 10 years or so has been in vim.  Before that, it was emacs, before
 that vi, and before that teco.

Man, you make me feel really old :-) Ciao Tom
Oct 16 2007
prev sibling next sibling parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Bruce Adams, by the way, what program are you using to post in the 
newsgroups?
:)

-- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Oct 15 2007
parent reply Bruce Adams <tortoise_74 yeah.who.co.uk> writes:
Bruno Medeiros Wrote:

 Bruce Adams, by the way, what program are you using to post in the 
 newsgroups?
  >:)
 
 
 -- 
 Bruno Medeiros - MSc in CS/E student
 http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D

The web interface. Its clunky but it works from opera.
Oct 15 2007
parent reply Regan Heath <regan netmail.co.nz> writes:
Bruce Adams wrote:
 Bruno Medeiros Wrote:
 
 Bruce Adams, by the way, what program are you using to post in the 
 newsgroups?
  >:)


 -- 
 Bruno Medeiros - MSc in CS/E student
 http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D

The web interface. Its clunky but it works from opera.

But.. Opera has a news reader built in, why not use that? Regan
Oct 16 2007
parent reply Bruce Adams <tortoise_74 yeah.who.co.yk> writes:
Regan Heath Wrote:

 Bruce Adams wrote:
 Bruno Medeiros Wrote:
 
 Bruce Adams, by the way, what program are you using to post in the 
 newsgroups?
  >:)


 -- 
 Bruno Medeiros - MSc in CS/E student
 http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D

The web interface. Its clunky but it works from opera.

But.. Opera has a news reader built in, why not use that? Regan

Simple answer, I haven't got around to it. I've heard the web interface has problems but I've not actually seen them. Presumably something is wrong with my posts or we wouldn't be having this conversation. So what is it? Bruce.
Oct 16 2007
parent BCS <ao pathlink.com> writes:
Reply to Bruce,

 Regan Heath Wrote:
 
 Bruce Adams wrote:
 
 Bruno Medeiros Wrote:
 
 Bruce Adams, by the way, what program are you using to post in the
 newsgroups?
 
 :)
 

Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D


Regan

interface has problems but I've not actually seen them. Presumably something is wrong with my posts or we wouldn't be having this conversation. So what is it? Bruce.

the web interface has a habit of not getting the reply to stuff correct and then news readers see posts as a new thread, not a reply.
Oct 16 2007
prev sibling next sibling parent David Brown <dlang davidb.org> writes:
On Mon, Oct 15, 2007 at 08:16:56PM -0400, Bruce Adams wrote:

You did say one thing that shocked me however. You switched from emacs to
vim. I would have though the switch would be the other way around. What
were the motivating factors?

Originally carpel-tunnel. Once I discovered that Vim could do the important things I wanted emacs for (syntax coloring, multiple-windows, indenting, and such), I learned the advanced features of Vim, and my wrists recovered. My other gripe with emacs is that there is no stable version that has anti-aliased text rendering. Other issues are that I could never run it anywhere else, because I didn't have my massive customizations from my .emacs file. David
Oct 15 2007
prev sibling parent reply Uno <unodgs tlen.pl> writes:
 The real power of an IDE comes through being able to script it. This 

Please stop claiming vi, emacs, grep (etc) are so great. Without any doubt D needs "normal" IDE. It's much easier for average user to work with. Debugging, compiling and running must work out of the box (for example press F5 to debug, ctrl-f5 to run, and you can see it in main menu/toolbar, no need to browse editor documentation to find esc, x,y,z combination ;) ). Good graphical IDE is one of the main key to make D more popular.
Oct 16 2007
parent Bruce Adams <tortoise_74 yeah.who.co.yk> writes:
Uno Wrote:

  > The real power of an IDE comes through being able to script it. This 
 is what made emacs such a success.
 
 Please stop claiming vi, emacs, grep (etc) are so great. Without any 
 doubt D needs "normal" IDE. It's much easier for average user to work 
 with. Debugging, compiling and running must work out of the box (for 
 example press F5 to debug, ctrl-f5 to run, and you can see it in main 
 menu/toolbar, no need to browse editor documentation to find esc, x,y,z 
 combination ;) ). Good graphical IDE is one of the main key to make D 
 more popular

I can see this thread is running out of steam. F5 is no more standard than esc x,y,z. Most editors let you alter the key bindings. I think even VC++ has this. Emacs of course had it all along. Bruce.
Oct 16 2007