POV-Ray : Newsgroups : povray.off-topic : Teach yourself C++ in 21 days : Re: Teach yourself C++ in 21 strange malfunctions Server Time
29 Jul 2024 18:17:08 EDT (-0400)
  Re: Teach yourself C++ in 21 strange malfunctions  
From: Invisible
Date: 18 Apr 2012 05:36:14
Message: <4f8e8b0e@news.povray.org>
> IDEs are only really useful for OO languages.

I do not agree.

> You know, you have a
> variable holding an instance of a class, then you type "." and get a
> list of methods available... no such thing in functional programming
> where the order is reversed: you have a function and want to apply
> arguments to it. You may list arguments that match that function
> definition and you may even know their types (assuming "intellisense"
> got type inference), but most likely you're not directly applying those
> arguments to the function, but applying some other function to it first.
> It sounds too much of hassle to use "intellisense" in those situations...

Did you know that there's a program called Djinn which can take any 
Haskell type signature and generate Haskell source code for it, if it's 
possible to write it without recursion?

Of course, there's usually more than one possible expression for a given 
type signature. So the code you get may well not be the code you 
actually wanted. But still, it's interesting that just a type signature 
is sometimes enough to generate useful, runnable code. (Try doing /that/ 
in a normal programming language...)

> I fear IDEs are really only useful at getting away with lesser
> languages' weaknesses
>
> so, all that would seem to rest of usefulness for an IDE is project
> management.

I do not agree.

Consider the things that a typical IDE does:

- Syntax highlighting. Bracket pairing.

- Generate parts of an expression as you type. (E.g., generate the 
matching close bracket, generate the "then" and "else" keywords when you 
type "if".)

- Highlight any syntax errors, mismatched brackets, unused variables.

- Allow you to compile the whole project with one keypress.

- Highlight the line of source code that the compiler is complaining about.

- Display a summary of what entities are defined in each file, what 
their types are, whether they're public or private, etc.

- Let you navigate to each entity in the list.

- Run the document extraction tool.

- Take you to the documentation for a given entity (regardless of 
whether its in your project or an installed 3rd party library).

- Easily launch your application.

- Run your test suite and log the results.

- Integrate with your source control system. Show interactive diffs. 
Show the history tree. Manage commits and reverts and branches.

- Integrate with the debugger. Let you single-step through your code. 
Let you create watches, inspect variables in scope, drill down through 
complex data structures.

Tell me, how do any of these things stop being useful if your 
programming language isn't object-oriented?


Post a reply to this message

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