Board index » delphi » What we really need (another look at the c++ vs. pascal discussion)

What we really need (another look at the c++ vs. pascal discussion)

I've seen people talk about C/C++ and pascal, but
I think they're really missing the point.

Delphi's success is not due to its use of pascal.
Actually, delphi's pascal is far from standard pascal.
Delphi's key to success is its environment and the VCL,
which really makes code reusing possible.
Important point for deplhi here were class properties,
which make encapsulation much tighter.

I myself prefer C/C++ to pascal, but have migrated
to delphi because its RAD environment is simply
superiour to any C++ environment available.
(I still hate BEGIN and END >:( )

The real issue is simplicity, transparency and
the amount of time needed to write code.

Word processing people have long since stopped using ASCII files,
and even HTML people are doing things in WYSIWYIG environment.

Seems like we're the last ones to be stuck with flat files.
It's like doing DTP in an ASCII editor, typing PostScript code.

Well, at least we have form designing, which simplifies thing
significantly, but we are (at least I am) still losing time
doing real OO programming.

80% of time in delphi, I'm scrolling up and down looking for routines
that I need, looking for that variable declaration, jumping up & down
to match procedure declarations & implementations... grrrr.

I think what we really need is an environment, where we could
simply choose a class in a tree view, and see all its fields
in a window (with comboboxes for field types),
see its properties with 2 text boxes for implementation methods and a
couple
of checkboxes to say if it's read or write only. We should be able
to see only one procedure in a window at a time and to enter comments
and annotations, to track changes, fold a loop (you know, when you have
this
dull but long loop that you don't want to see all the time, so you can
concentrate on other things) or anything between {} or BEGIN END.
We should be able to see which members are inherited and which are
protected
right in the window where we code.

And, as far as the choice of language is concerned, it doesn't really
matter.
With good architecture it's simply a matter of taste.
Borland changed pascal, so why not change C++?
I know, people will talk about multiple platforms and so on, but let's be
realistic. Majority of things is done for 3-4 operating systems and a
company
like Borland can make mutually compatible RAD environments for all of them.
Anyway, changes needed to implement properties and some other stuff aren't
really
big and the environment could still output standard C++ files.

Let's hear what you people think and what you would like to see in an
ideal programming environment.

Zoran Obradovic'

 

Re:What we really need (another look at the c++ vs. pascal discussion)


Zoran Obradovic <zo...@kud.fp-si> wrote in article
<01bbe6ac$784d0ee0$84bebdc1@default>...

Quote
> I've seen people talk about C/C++ and pascal, but
> I think they're really missing the point.

> Delphi's success is not due to its use of pascal.
> Actually, delphi's pascal is far from standard pascal.
> Delphi's key to success is its environment and the VCL,
> which really makes code reusing possible.
> Important point for deplhi here were class properties,
> which make encapsulation much tighter.

> I myself prefer C/C++ to pascal, but have migrated
> to delphi because its RAD environment is simply
> superiour to any C++ environment available.
> (I still hate BEGIN and END >:( )

> The real issue is simplicity, transparency and
> the amount of time needed to write code.

> Word processing people have long since stopped using ASCII files,
> and even HTML people are doing things in WYSIWYIG environment.

> Seems like we're the last ones to be stuck with flat files.
> It's like doing DTP in an ASCII editor, typing PostScript code.

> Well, at least we have form designing, which simplifies thing
> significantly, but we are (at least I am) still losing time
> doing real OO programming.

> 80% of time in delphi, I'm scrolling up and down looking for routines
> that I need, looking for that variable declaration, jumping up & down
> to match procedure declarations & implementations... grrrr.

> I think what we really need is an environment, where we could
> simply choose a class in a tree view, and see all its fields
> in a window (with comboboxes for field types),
> see its properties with 2 text boxes for implementation methods and a
> couple
> of checkboxes to say if it's read or write only. We should be able
> to see only one procedure in a window at a time and to enter comments
> and annotations, to track changes, fold a loop (you know, when you have
> this
> dull but long loop that you don't want to see all the time, so you can
> concentrate on other things) or anything between {} or BEGIN END.
> We should be able to see which members are inherited and which are
> protected
> right in the window where we code.

> And, as far as the choice of language is concerned, it doesn't really
> matter.
> With good architecture it's simply a matter of taste.
> Borland changed pascal, so why not change C++?
> I know, people will talk about multiple platforms and so on, but let's be
> realistic. Majority of things is done for 3-4 operating systems and a
> company
> like Borland can make mutually compatible RAD environments for all of
them.
> Anyway, changes needed to implement properties and some other stuff
aren't
> really
> big and the environment could still output standard C++ files.

> Let's hear what you people think and what you would like to see in an
> ideal programming environment.

> Zoran Obradovic'

I think these are all very reasonable comments. Both the praises and the
criticisms represent my point of view very well. I especially agree with
your remarks about the awkwardness of having to continually scroll up and
down to find variable declarations and procedures. I'd like to see
something like Visual C++'s class view included in Delphi, so that you can
see at a glance any public, private or protected variables or methods for a
given class, and jump straight to that point in your code by double
clicking it.

With regard to changes in C++ to facilitate RAD programming (presume you're
talking about C++Builder?), I think the benefits far outweigh the
disadvantages. THE most sensible thing about RAD programming, in my
opinion, is the ability to change the state and behaviour of objects at
either design time or run time by manipulating their properties rather than
by calling functions with long and obscure parameter lists as with MFC and
OWL. I know that it's _possible_ to write class libraries in ANSI C++ which
mimic properties, but it's a pain in the arse to implement it. If we're
going to program for Windows, why not have the tools that are best designed
for our purpose? Standards are continually changing anyway, but that aside,
if people object to using anything but strict ANSI C++, nobody's forcing
them.

Re:What we really need (another look at the c++ vs. pascal discussion)


Zoran Obradovic <zo...@kud.fp-si> wrote in article
<01bbe6ac$784d0ee0$84bebdc1@default>...
[cut]

Quote
> (I still hate BEGIN and END >:( )

[cut]

Use the macro recorder of Win3.1(1) (What? Got Win95? Get a copy from a
Win3.1 setup, it still works!), and define CTRL+{ to type BEGIN[cr], and
CTRL+} to type END;[cr]. OK, it's not a perfect solution, but it might
help?

BFN
        Ade.

PS: I've never used C++, so language arguments are irrelevant to me.
However, it *would* be nice to be able to split the editor window AKA VB.
'course, you can open another view to the same unit, so all is not
completely lost.

--
----------------------------------------------------------------------------

All opinions expressed are (c)1996 Adrian Vickers. Opinions should only be
shared if you are using a sterilised computer. Always wash your eyes before

viewing. Please use the approved eyecups (40ukp extra each, plus VAT & P&P)
E-Mail adrianvick...@msn.com for ordering details/more heated opinions.
----------------------------------------------------------------------------

Re:What we really need (another look at the c++ vs. pascal discussion)


Quote
> I've seen people talk about C/C++ and pascal, but
> I think they're really missing the point.

> Delphi's success is not due to its use of pascal.
> Actually, delphi's pascal is far from standard pascal.
> Delphi's key to success is its environment and the VCL,
> which really makes code reusing possible.
> Important point for deplhi here were class properties,
> which make encapsulation much tighter.

> I myself prefer C/C++ to pascal, but have migrated
> to delphi because its RAD environment is simply
> superiour to any C++ environment available.
> (I still hate BEGIN and END >:( )

I agree with this.  I had no real desire to learn Pascal in-and-of itself,
but it has been very worthwhile to be able to use Delphi.

Quote
> 80% of time in delphi, I'm scrolling up and down looking for routines
> that I need, looking for that variable declaration, jumping up & down
> to match procedure declarations & implementations... grrrr.

> I think what we really need is an environment, where we could
> simply choose a class in a tree view, and see all its fields
> in a window (with comboboxes for field types),
> see its properties with 2 text boxes for implementation methods and a
> couple
> of checkboxes to say if it's read or write only. We should be able
> to see only one procedure in a window at a time and to enter comments
> and annotations, to track changes, fold a loop (you know, when you have
> this
> dull but long loop that you don't want to see all the time, so you can
> concentrate on other things) or anything between {} or BEGIN END.
> We should be able to see which members are inherited and which are
> protected
> right in the window where we code.

Again, I agree.  I spend a LOT of time scrolling in Delphi.  In VB, it is
easy to focus on the routine you are working on because it is in a separate
window.  I can page into and out of other routines very easily.  Do any 3rd
party editors exist that do any or all of what you described?
----------------------------------------------------------------------
Jay B.

Man's mind stretched to a new idea
never goes back to its orginal dimension.
      ==Oliver Wendell Holmes==

Re:What we really need (another look at the c++ vs. pascal discussion)


Zoran Obradovic <zo...@kud.fp-si> wrote in article
<01bbe6ac$784d0ee0$84bebdc1@default>...
[...]

Quote

> The real issue is simplicity, transparency and
> the amount of time needed to write code.

ClassBuilder 4.0 for Delphi was announced in c.l.p.d.announce the
other day - it generates classes from a few mouse clicks and typeins.
It even fills the functions with the appropriate code.

{...]

Quote
> Well, at least we have form designing, which simplifies thing
> significantly, but we are (at least I am) still losing time
> doing real OO programming.

see note above

Quote
> 80% of time in delphi, I'm scrolling up and down looking for routines
> that I need, looking for that variable declaration, jumping up & down
> to match procedure declarations & implementations... grrrr.

when your classes are generated with ClassBuilder, correspondence
is guaranteed.

Quote
> I think what we really need is an environment, where we could
> simply choose a class in a tree view, and see all its fields
> in a window (with comboboxes for field types),

Yeah, the "browser" needs improvement.

Quote
> see its properties with 2 text boxes for implementation methods and a
> couple
> of checkboxes to say if it's read or write only. We should be able
> to see only one procedure in a window at a time and to enter comments
> and annotations, to track changes, fold a loop (you know, when you have
> this
> dull but long loop that you don't want to see all the time, so you can
> concentrate on other things) or anything between {} or BEGIN END.

uh, if the loops are that long, maybe the contents should be a few
function calls...

Quote
> We should be able to see which members are inherited and which are
> protected
> right in the window where we code.

I liked the BP7 environment with tiled windows for each unit.

Quote
> And, as far as the choice of language is concerned, it doesn't really
> matter.
> With good architecture it's simply a matter of taste.
> Borland changed pascal, so why not change C++?

too late to change C++

Quote
> Anyway, changes needed to implement properties

naah, we don't need 'properties' in C++; that can be handled with
data members and accessors and modifiers.

Quote
> and some other stuff aren't
> really
> big and the environment could still output standard C++ files.

That's coming in C++Builder, release in ~Jan '97. But as the joke at
Borland goes, Latte is like any other project except it has another 't'
in the name.

---
Grace + Peace   *   Peter N Roth  *   Engineering Objects International
Software Development & Training in Delphi & C++

Re:What we really need (another look at the c++ vs. pascal discussion)


Quote
In article <01bbe6ac$784d0ee0$84bebdc1@default>, "Zoran Obradovic" <zo...@kud.fp-si> wrote:
>I've seen people talk about C/C++ and pascal, but
>I think they're really missing the point.

>Delphi's success is not due to its use of pascal.

I'd totally agree - For me (an engineer by schooling,
programmer by experience) learning a new language isn't that difficult -
What's really important is finding a tool which can make my programming more
efficient. Delphi does this for me.

[munched stuff...]

Quote
>80% of time in delphi, I'm scrolling up and down looking for routines
>that I need, looking for that variable declaration, jumping up & down
>to match procedure declarations & implementations... grrrr.

I here you in a big way here!! I really miss the good 'ole F2 function from
VB 3.0's editor - it showed a listbox with all of the subs & functions in that
unit, and allowed you to jump right to them. I find myself jumping to the top
of a unit, then using the Ctrl-F (Find) box alot to find a procedure.

Quote
>Let's hear what you people think and what you would like to see in an
>ideal programming environment.

I like the ideas you have already come up with. (Collapsable loops, a better
class viewer, etc...) Also you should be able to print a class structure in a
nice diagram or something for documentation purposes. We definately need some
type of better procedure/function browser.

Peter.

*************************************************************************
* Peter G. Millard      ******************* Maintainer of the VB        *
* mill...@buffnet.net       **************  General & VBDOS FAQ's      *
* http://www.buffnet.net/~millard  ******** Error Reading Drive A.....      *
* http://www.vantek-corp.com             **     Formatting C: Instead    *
*************************************************************************

Re:What we really need (another look at the c++ vs. pascal discussion)


On 10 Dec 1996 15:09:46 GMT, "Zoran Obradovic" <zo...@kud.fp-si>
wrote:

Quote
>I've seen people talk about C/C++ and pascal, but
>I think they're really missing the point.

>Delphi's success is not due to its use of pascal.

for myself: both.

Quote
>Actually, delphi's pascal is far from standard pascal.
>Delphi's key to success is its environment and the VCL,
>which really makes code reusing possible.
>Important point for deplhi here were class properties,
>which make encapsulation much tighter.

>I myself prefer C/C++ to pascal, but have migrated
>to delphi because its RAD environment is simply
>superiour to any C++ environment available.
>(I still hate BEGIN and END >:( )

i never understood where there is a problem typing begin end???

Quote
>The real issue is simplicity, transparency and
>the amount of time needed to write code.

>Word processing people have long since stopped using ASCII files,
>and even HTML people are doing things in WYSIWYIG environment.

>Seems like we're the last ones to be stuck with flat files.
>It's like doing DTP in an ASCII editor, typing PostScript code.

>Well, at least we have form designing, which simplifies thing
>significantly, but we are (at least I am) still losing time
>doing real OO programming.

>80% of time in delphi, I'm scrolling up and down looking for routines
>that I need, looking for that variable declaration, jumping up & down
>to match procedure declarations & implementations... grrrr.

>I think what we really need is an environment, where we could
>simply choose a class in a tree view, and see all its fields
>in a window (with comboboxes for field types),
>see its properties with 2 text boxes for implementation methods and a
>couple
>of checkboxes to say if it's read or write only. We should be able
>to see only one procedure in a window at a time and to enter comments
>and annotations, to track changes, fold a loop (you know, when you have
>this
>dull but long loop that you don't want to see all the time, so you can
>concentrate on other things) or anything between {} or BEGIN END.
>We should be able to see which members are inherited and which are
>protected
>right in the window where we code.

>And, as far as the choice of language is concerned, it doesn't really
>matter.
>With good architecture it's simply a matter of taste.
>Borland changed pascal, so why not change C++?
>I know, people will talk about multiple platforms and so on, but let's be
>realistic. Majority of things is done for 3-4 operating systems and a
>company
>like Borland can make mutually compatible RAD environments for all of them.
>Anyway, changes needed to implement properties and some other stuff aren't
>really
>big and the environment could still output standard C++ files.

>Let's hear what you people think and what you would like to see in an
>ideal programming environment.

>Zoran Obradovic'

C and C++ are very popular in the last years, but my opinion is: we
should use the right tool for the right task: for sure: programming a
device driver, C or C++ will be superior.

but for 95% of the windows applications, programmed with a RAD tool in
my opinion pascal is significant superior: you can read the code more
easily, you cant do "strange" things that easy - a LOT OF
constructions leading to possible faults are forbidden in pascal (type
conventions, ...) - not in C and so on...

alex
========================================
DI Alexander Schatten
Institute for General Chemistry
University of Technology Vienna
email: asch...@fbch.tuwien.ac.at
URL: http://echm10.tuwien.ac.at/inst/as
Tel.: +43 1 914-29-84
========================================

Re:What we really need (another look at the c++ vs. pascal discussion)


Quote
> >I myself prefer C/C++ to pascal, but have migrated
> >to delphi because its RAD environment is simply
> >superiour to any C++ environment available.
> >(I still hate BEGIN and END >:( )

> i never understood where there is a problem typing begin end???

This is a common misconception among "pascal people".

There's no problem in typing BEGIN and END,
the problem is reading programs with BEGIN and END.

For examle:

some-kind-of-loop (criteria)
{
        int x;

        do-something;
        another-loop (more-criteria)
        {
                do-more;
                do-more;
        };

Quote
};

and

some-kind-of-loopcriteria
var x:integer;
begin
        do-something;
        another-loop more-criteria
        begin
                do-more;
                do-more;
        end;
end;

I find the first code much more legible than the second.

--
Zoran Obradovic'
-----------------
attrib %1 -r
pkunzip .
cd %1
cd ..
cd %1
cd ..
cd %1
cd ..
pkzip .
attrib %1 +a

Re:What we really need (another look at the c++ vs. pascal discussion)


Quote
Alexander Schatten wrote:
> C and C++ are very popular in the last years, but my opinion is: we
> should use the right tool for the right task: for sure: programming a
> device driver, C or C++ will be superior.

> but for 95% of the windows applications, programmed with a RAD tool in
> my opinion pascal is significant superior: you can read the code more
> easily, you cant do "strange" things that easy - a LOT OF
> constructions leading to possible faults are forbidden in pascal (type
> conventions, ...) - not in C and so on...

Well, I am also converted into the delphi, but after all I think that it
is Java, that gives true OOP, not delphi. Thereason why delphi does not
give so much comfort in programming is also in the fact that it is
impossible to have overloaded functions, which I have found extremely
inconvenient

Still, as an application tool it is easier than text editor for java.
Hope someone will put Java in the delphi enviroment.

Re:What we really need (another look at the c++ vs. pascal discussion)


As always, there is a disagreement.  I prefer begin-end over {} because
I have poor eyesight, and with begin-end it is easier for me to visually
delineate without pressing my nose against the CRT.

Anybody else done this?

#define BEGIN {
#define END  }

Quote
> This is a common misconception among "pascal people".

> There's no problem in typing BEGIN and END,
> the problem is reading programs with BEGIN and END.

> For examle:

> some-kind-of-loop (criteria)
> {
>         int x;

>         do-something;
>         another-loop (more-criteria)
>         {
>                 do-more;
>                 do-more;
>         };
> };

> and

> some-kind-of-loopcriteria
> var x:integer;
> begin
>         do-something;
>         another-loop more-criteria
>         begin
>                 do-more;
>                 do-more;
>         end;
> end;

Re:What we really need (another look at the c++ vs. pascal discussion)


Quote
Greg wrote:

> Alexander Schatten wrote:
> > C and C++ are very popular in the last years, but my opinion is: we
> > should use the right tool for the right task: for sure: programming a
> > device driver, C or C++ will be superior.

Why is that?

Quote
> > but for 95% of the windows applications, programmed with a RAD tool in
> > my opinion pascal is significant superior: you can read the code more
> > easily, you cant do "strange" things that easy - a LOT OF
> > constructions leading to possible faults are forbidden in pascal (type
> > conventions, ...) - not in C and so on...

I like that about Object Pascal.

Quote
> Well, I am also converted into the delphi, but after all I think that it
> is Java, that gives true OOP, not delphi. Thereason why delphi does not
> give so much comfort in programming is also in the fact that it is
> impossible to have overloaded functions, which I have found extremely
> inconvenient

I'l refrain from Java comments, as I have never used it - but for "true"
OOP - you have to go to SmallTalk.  Object Pascal is pretty close,
object wise,
to Smalltalk - far closer than C/C++. - for what it matters.  As the
object modal
you like is the one you should use.

Quote
> Still, as an application tool it is easier than text editor for java.
> Hope someone will put Java in the delphi enviroment.

Borland's Jbuilder (was latte) has the Delphi IDE.

1i

Re:What we really need (another look at the c++ vs. pascal discussion)


Greg <AG...@AOL.com> wrote in article <32B710C2.5...@AOL.com>...

Quote
> Well, I am also converted into the delphi, but after all I think that it
> is Java, that gives true OOP, not delphi.

true oop is some kind of religion, eh? Delphi (ie, Object Pascal)
does the whole object oriented thing.

Quote
> Thereason why delphi does not
> give so much comfort in programming is also in the fact that it is
> impossible to have overloaded functions, which I have found extremely
> inconvenient

Do you mean overloaded operators? Overloaded functions are
defined as 'virtual' in a Parent class & 'override' in Child class.

BTW, Overloaded operators are not part of 'object oriented'.
At least not _true_ oop.

Quote
> Still, as an application tool it is easier than text editor for java.
> Hope someone will put Java in the delphi enviroment.

I am told Cafe by Symantec is pretty good, haven't seen it.
And Borland's put something into BC5 that does Java, too.
--
Grace + Peace   *   Peter N Roth  *   Engineering Objects International
Instant Classes!  ClassBuilder 4 for Delphi, ClassBuilder++ for C++

Re:What we really need (another look at the c++ vs. pascal discussion)


Quote
> Well, I am also converted into the delphi, but after all I think that it
> is Java, that gives true OOP, not delphi. Thereason why delphi does not
> give so much comfort in programming is also in the fact that it is
> impossible to have overloaded functions, which I have found extremely
> inconvenient

Java very noticeably drops some OO features of C++.

Quote
> Still, as an application tool it is easier than text editor for java.
> Hope someone will put Java in the delphi enviroment.

Symantec's VISUAL CAFE is very nice and it looks quite a bit like DELPHI.
Check out JBUILDER from Borland in a few months.

--
--------------------------
Eric Lawrence
Delta Programming Group
Delta...@juno.com

Re:What we really need (another look at the c++ vs. pascal discussion)


Quote
> Do you mean overloaded operators? Overloaded functions are
> defined as 'virtual' in a Parent class & 'override' in Child class.

well, not true...
examples of overloaded functions would be:

list_type::add(int integer_item);
list_type::add(char char_item);

and the compiler decides which one to use depending on your
arguments.

thus
        a_list.add(3);

would call the first one and

        a_list.add('a');

would call the second one.

no such thing in Delphi.

--
Zoran Obradovic'
-----------------
attrib %1 -r
pkunzip .
cd %1
cd ..
cd %1
cd ..
cd %1
cd ..
pkzip .
attrib %1 +a

Re:What we really need (another look at the c++ vs. pascal discussion)


Zoran Obradovic <zo...@kud.fp-si> wrote in article
<01bbec8f$6cf20760$3fbebdc1@default>...

Quote
> examples of overloaded functions would be:

> list_type::add(int integer_item);
> list_type::add(char char_item);

[...]
> no such thing in Delphi.

Aah yes! the names of the functions
would have to be (like) addint and addchar
as D is now.
--
Grace + Peace   *   Peter N Roth  *   Engineering Objects International
Tools for Developers ClassBuilder 4 for Delphi, ClassBuilder++ for C++
Go to page: [1] [2]

Other Threads