The Artima Developer Community
Sponsored Link

Weblogs Forum
Agile C++?

24 replies on 2 pages. Most recent reply: Jan 20, 2005 1:19 PM by Bill Burris

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 24 replies on 2 pages [ 1 2 | » ]
Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Agile C++? (View in Weblogs)
Posted: Jan 4, 2005 11:43 PM
Reply to this message Reply
Summary
What would a developer expect from a more agile C++?
Advertisement
If I said to you I have a more agile C++, what would you expect that I had? For instance, at the very least I would expect object-oriented primitives. What I want to know is what other things programmers would expect from something sporting the moniker "Agile C++".


Alastair Patrick

Posts: 3
Nickname: alpatrick
Registered: Dec, 2004

Re: Agile C++? Posted: Jan 5, 2005 12:18 AM
Reply to this message Reply
To my mind, agile development goes hand in hand with refactoring and test driven development.

Beyond object-oriented primitives, for refactoring I would want language constructs that express OO in a much cleaner way than C++, perhaps closer to Java or C#. This would make refactoring much easier and open the door to automated rafactoring tools such as those in Eclipse.

Something that refactoring and test driven development both require is fast build times. Build times for even medium sized C++ programs can run into tens of minutes. This is no good for a refactor / build / test iteration. Agile C++ would offer quick builds.

On the other hand, why would we want an Agile C++ over a language like Java. Perhaps Java is an agile C++? The "C++" in "Agile C++" means to me that it is either a language for developing high performance programs or one that supports system level programming.

Actually, I think I make it sound a lot like Managed C++ or C++/CLI.

My two cents.

Al

disney

Posts: 35
Nickname: juggler
Registered: Jan, 2003

Re: Agile C++? Posted: Jan 5, 2005 5:00 AM
Reply to this message Reply
Given the name, I would expect to find in-language support for refactoring. Maybe patterns too. ... And self-documenting aids. ... And all the other things that might occur to you after you read the Agile Manifesto (http://agilemanifesto.org/)!

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Agile C++? Posted: Jan 5, 2005 11:37 AM
Reply to this message Reply
At comp.software.extreme-programming I wrote a post asking about what makes a language agile [ http://tinyurl.com/6wknx ]. For me an agile language would have as many features as possible from the following list:

- short (or non-existant) build times
- extendable syntax
- produces easily reused code
- multi-paradigm ( able to choose appropriate programming methodology for given problem, whether it is object-oriented, procedural, generic programming or functional )
- run-time type information / type-checking
- dynamic reflection / introspection of code
- clean and readable syntax
- AOP support
- supports static type-checking when desired
- allows the writing of highly efficient code when needed
- all primitives are objects
- supports interfaces
- compiled, interpreted and mixed modes as needed
- allows shell like piping of programs
- easily mixed with other languages

Dan Shappir

Posts: 1
Nickname: shappir
Registered: Jan, 2005

Re: Agile C++? Posted: Jan 5, 2005 11:41 AM
Reply to this message Reply
Proper support for reflection would seem to be a prerequisite for the items listed so far. I would also like to have proper, or at least improved, support for closures though I'm not sure that this is directly associated with "agile".

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Agile C++? Posted: Jan 5, 2005 11:46 AM
Reply to this message Reply
I think closures are an important addition to the list. I think part of what makes a language agile would be "the right tool for the job", which means supporting a wide set of techniques.

Todd Blanchard

Posts: 316
Nickname: tblanchard
Registered: May, 2003

Re: Agile C++? Posted: Jan 5, 2005 12:08 PM
Reply to this message Reply
Optional typing of variables and live runtime that enables coding in the debugger.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Agile C++? Posted: Jan 5, 2005 1:27 PM
Reply to this message Reply
> For me an agile language would
> have as many features as possible...

I don't think simply piling in "as many features as possible" makes a language Agile. In fact, I would consider a chunk of code that simultaneously contained any significant mix of all the suggested features to be horribly complex and unmaintainable - the antithesis of Agile.

Being Agile has pretty much nothing to do with the language being used during the code writing stages and everything to do with the environment in which the total product is being developed. All efficiency gains and losses that particular language features may -theoretically - provide are dwarfed by the differences in ability between different programmers. That's why Agile development places the emphasis is on people oriented processes (e.g. testing, small teams/pair programming, high internal and external communications, minimal paper documentation, rapid turn around of small chunks of work, etc).

Without the appropriate processes in place to aid software developers, there is no feature set that can be added to a language to compensate. With the right processes, pretty much any language can be used in an Agile manner.

Vince.

Robert C. Martin

Posts: 111
Nickname: unclebob
Registered: Apr, 2003

Re: Agile C++? Posted: Jan 5, 2005 3:43 PM
Reply to this message Reply
"Agile" is not an adjective that can be used to describe a language. "Agile", in it's current popular form in the software industry, means: "Short cycles that are test driven and feedback driven, yeilding constant improvement."

So C++ is neither agile nor inagile. However, one tool that would help C++ prosper in an agile environment is a convenient refactoring browser.

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Agile C++? Posted: Jan 5, 2005 4:10 PM
Reply to this message Reply
> "Agile" is not an adjective that can be used to describe a
> language.
>
> "Agile", in it's current popular form in the
> software industry, means: "Short cycles that are test
> driven and feedback driven, yeilding constant
> improvement."

As you are likely aware, there is nonetheless a trend towards calling scripting/dynamic languages (e.g. Python, Ruby) "agile languages" (see http://altis.pycs.net/2003/04/14.html ). I imagine that this must be frustrating to a certain degree, for yourself and other signatories of the agile manifesto.

There always exists a problem when a catchy adjective such as "agile" is applied to such a narrow part of information technology. It quickly becomes used as a synonym for "good", examples like RAD, 4GL, object-oriented, etc. spring to mind.

Are there any plans on broadening the scope of what it means to be agile? Perhaps by taking a preemptive step of formally defining "agile languages" or "agile technologies" it can help to prevent misapplication of the term.

Kristian Dupont

Posts: 22
Nickname: chryler
Registered: Dec, 2003

Re: Agile C++? Posted: Jan 6, 2005 12:09 PM
Reply to this message Reply
While very powerful, I think that the type system of C++ gets in the way of agile development from time to time. Adding some sort of optional hm type inference to allow less verbose code would help the situation. Not that this is going to happen, ever.. Are you including it in Heron? :)

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Agile C++? Posted: Jan 6, 2005 2:03 PM
Reply to this message Reply
> While very powerful, I think that the type system of C++
> gets in the way of agile development from time to time.

I fully agree. I am however working at ways to unify the C++ type system in the OOTL (see http://www.ootl.org/objects.html )

> Adding some sort of optional hm type inference to allow
> less verbose code would help the situation. Not that this
> is going to happen, ever.. Are you including it in Heron?
> :)

Well I am not a big fan of unrestrained HM type inference, however the OOTL / BIL approach does provide many of the benefits of type inference. Heron will include interfaces which operate in a similar manner.

Terje Slettebø

Posts: 205
Nickname: tslettebo
Registered: Jun, 2004

Re: Agile C++? Posted: Jan 7, 2005 6:06 AM
Reply to this message Reply
>For instance, at the very least I would expect object-oriented primitives.

What would you gain from all primitives being objects? I.e. what would you be able to do with an "int" object, that you can't do with an "class { int name; };" object?

Also, interestingly, the C++ standard defines both built-in and user-defined types as objects, quite appropriately, IMO. The built-in types may be considered to have operator functions, etc.

If "int" were to be an object, how would you refer to the value in the subclass, if you inherit from it. E.g. (not C++ code):

class derived : public int
{
// How to refer to the int, here?
};

In "The Design and Evolution of C++", Bjarne Stroustrup writes that he considered being able to derive from the built-in types, but decided against it, since you may get a similar effect by wrapping it in a class.

Regards,

Terje

Stephen Birch

Posts: 3
Nickname: sgbirch
Registered: Jan, 2005

Re: Agile C++? Posted: Jan 7, 2005 1:38 PM
Reply to this message Reply
Easy

Agile C++ == python

Steve

Bill Burris

Posts: 24
Nickname: billburris
Registered: Aug, 2003

Re: Agile C++? Posted: Jan 11, 2005 4:41 PM
Reply to this message Reply
Agile C++ would not be equal to Python. Agile C++ would need to be a superset of C++, therefore, would still be useable for writing code that needs to be highly efficient in terms of CPU resource utilization. When highly efficient code is needed in Python it is done by recoding the time critcal parts in C or C++. The problem there is if you need to refactor, you have to move code back and forth between Python & C++.

Many applications that are coded in C++ could be done with Python, but not everything.

In my attempts to use Agile for One techniques, I have found C# to be much more friendly then C++. In C# it is very simple to create applications divided into several libaries. This includes having your unit test code in separate libaries. With C++ it is more of a struggle to setup multiple build senarios while keeping the test code separate from the release code. In C# the NUnit code for testing the libraries uses the same libraries as the application. In C++ I only kept things separate at the source code level, and built multiple executables for testing & release.

For Agile C++ we don't need a new language, we just need easier ways for building separate modules of executable code and sticking them together in various ways at run time.

We also need refactoring tools, but the problem here is the complexity of C++ makes this difficult.

I have run into a problem with refactoring when mixing C++ & C#. I would just write all my code in C# but this is not possible at this time. The first reason is that much of my code was written before C# existed. The second problem is that .NET is still incomplete, so there is no easy way to do I/O on non standard devices. Hopefully this second problem will be solved by WDF (Windows Driver Foundation) & putting USB controller chips in all my external electronics.

Flat View: This topic has 24 replies on 2 pages [ 1  2 | » ]
Topic: CityDesk: A Decent Tool for WebLogs? Previous Topic   Next Topic Topic: Deployable Units and Layers


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us