POV-Ray : Newsgroups : povray.off-topic : What's in an IDE? : Re: What's in an IDE? Server Time
4 Sep 2024 17:21:36 EDT (-0400)
  Re: What's in an IDE?  
From: Invisible
Date: 1 Mar 2010 06:31:01
Message: <4b8ba575$1@news.povray.org>
>>> Or if you type a function name that doesn't exist yet, you can click 
>>> and say "generate the boilerplate code for this function".
>>
>> What's to generate? I'm presuming it just makes a one-line function 
>> stub... unless you mean it does something more complex than that?
> 
> eg if I type in "bool result = NewFunction(width,height);" and tell it 
> to make the stub, it will insert this immediately below the existing 
> function:
> 
> private bool NewFunction(double width, double height)
> {
> throw new NotImplementedException();
> }
> 
> Again, not a huge timesaver, but it's so easy to use and it comes up so 
> often it's worthwhile.

It actually throws an exception to remind you that you need to implement 
it, rather than just silently doing nothing? Oh, that's nice...

Is there some way to quickly find all the stubs you haven't filled out 
yet? (Other than just running the program and hoping it throws an 
exception so you can see the stack trace.)

>>> Or you can go to "Insert -> New Class" and it will create a new file 
>>> with the new class template in it.
>>
>> Again, shouldn't an empty class be trivial to write in the first place?
> 
> Sure, but it's something so common to do that even saving 30 seconds is 
> a benefit, especially if you want it in a new file, and that file to be 
> saved, added to the current project and opened in the IDE.

OK, fair enough. I don't know about C#, but an empty class file in Java 
is 2 lines. You tell VS what the class name is, and (hence the file name 
MUST match the class name) it automatically saves it in the right place 
with the right name. But sure, why not have it type the class 
declaration as well? I guess it all helps. (Just so long as it doesn't 
try to "help" by writing the entire application for you...)

>> OK, now does it blindly rename it *everywhere*? Like just a find & 
>> replace? Or does it actually apply scoping rules so that it knows it's 
>> renaming "the same" variable throughout?
> 
> Of course it applies scoping rules, it would be a bit useless if it didn't.

OK, good.

>> Smalltalk VisualWorks had a feature to rename a method, but 
>> unfortunately it was a blind find & replace. If you wrote a class and 
>> discovered that one of your method names as the same as some other 
>> random class and you wanted to make it different, *all* the method 
>> calls would get renamed.
> 
> That wouldn't really work in .net, as the same common variable names and 
> methods are used repeatedly in a huge number of classes.

Yah, that's kind of the problem. ;-)

As I say, in Smalltalk, you can't tell which class a given variable is, 
so you can't tell if you're calling #reset on a network socket or a 
customer object. Which means if you want to rename the customer class's 
#reset method... yeah, good luck with that.

With a statically typed language, an IDE ought to be able to do better. 
(And from the sound of it, VS does.)

> Oh one more:
> 
> 8) Right click and "Go to definition" on a method.  And of course the 
> View -> Navigate Back button afterwards :-)

So it's not just me who occasionally forgets where the **** I actually 
defined the matrix inversion method? :-D


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.