Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

OT Java, C#, C++
Although still off-topic, I was just wondering, ...

In the threads on Java, it seems to me that some of those embracing OO are
moving from Java to C# (not C++).

I know that the CLI run-time (I think that is what is still called outside
Microsoft) is available on other platforms, but I was wondering how "portabl
e"
those using C# is in practice.

Are those using C# mostly doing Windows applications?

If you wanted to do OO for a "portable to where CLI isn't" environment, woul
d
you use Java or C++ - or something else (and why)?

Just curious.

--
Bill Klein
wmklein <at> ix.netcom.com



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
01-11-08 11:56 PM


Re: OT Java, C#, C++

"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:I%Phj.255354$He.247582@fe08.news.easynews.com...
> Although still off-topic, I was just wondering, ...
>
> In the threads on Java, it seems to me that some of those embracing OO are
> moving from Java to C# (not C++).
>
> I know that the CLI run-time (I think that is what is still called outside
> Microsoft) is available on other platforms, but I was wondering how
> "portable" those using C# is in practice.
>
> Are those using C# mostly doing Windows applications?

Speaking for myself, "Yes". (Its where the market is...)
>
> If you wanted to do OO for a "portable to where CLI isn't" environment,
> would you use Java or C++ - or something else (and why)?

Possibly Java, but more likely C#. It has arguably better facilities than
Java (although this is subjective; both languages are excellent), but I
specifically like certain features of C# (better IDE and Debugging, FOREACH
for iterating over collections... SO easy, and very easy-to-write event
handlers. Mainly, I like the succinct, easy-to-read code and the fact that
everything is typed. Stuff (even complex machine oriented stuff) just
works...

If the User had Java already, and/or expressed a preference for NO C#, then
I'd use Java.
>
> Just curious.
>

Based on a sample of one :-) written totally as an experiment, but a real
application...:

1. C# developed on a Windows platform and NOT using unmanaged code
(specifically, InterOp Services) or platform-specific Classes, runs
perfectly on any Windows platform running the appropriate version of DotNET.

2. The SAME C# Assembly runs correctly on a machine running Mono/Linux,
WITHOUT recompile or reconfiguring.

C# is accelerating in popularity for a number of reasons, and cross-platform
capability is just one aspect of it.

I only wish I had got into it sooner; I could have saved myself a lot of
aggravation with OO COBOL.

Pete.
--
"I used to write COBOL...now I can do anything."



Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
01-11-08 11:56 PM


Re: OT Java, C#, C++
William M. Klein wrote:
> Although still off-topic, I was just wondering, ...
>
> In the threads on Java, it seems to me that some of those embracing OO are
> moving from Java to C# (not C++).

But of course!  :)  (heh - I say that, but in my current job, we're 100%
Java.  I had to write a batch job to run on a Windows server, so I wrote
it in J#.)

> I know that the CLI run-time (I think that is what is still called outside
> Microsoft) is available on other platforms, but I was wondering how "porta
ble"
> those using C# is in practice.

I have tried to do some development on Linux (a web application), but I
couldn't get it to work.  Granted, this was a while back, and I haven't
tried it since.  I believe that Pete has someone using one of his
assemblies (that's the name for a .NET package) under Mono, the .NET
runtime for *nix.

> If you wanted to do OO for a "portable to where CLI isn't" environment, wo
uld
> you use Java or C++ - or something else (and why)?

I'd use Java.  It handles memory management itself, and the JVM converts
types that aren't supported natively.  Oh yeah, one other reason - NO
POINTERS!  :)  In my experience, C++ isn't portable; and, I've never
read anything that claimed that it was.

I've mentioned before, I've really been impressed with PHP, especially
with the enhancements in version 5.  It's fast!  And, anything I do
outside work is oriented to the web.  It doesn't have to be installed,
it can be accessed globally, and everyone pretty much already has a
client.  And, portability then becomes moot as well - you can serve from
whatever OS to whatever OS, and they all play nicely.

(Of course, economics comes into play here too.  My web host charges an
extra $2/mo for Java support, and an extra $3/mo for .NET support (but
only on Windows accounts, which mine is not).  PHP is free.  I asked
them about Mono on Linux, and they said that they didn't even offer it
because when they tested it, they couldn't support more than a few sites
on the equivalent hardware without it really bogging down.  So, I pay my
$6.95/mo, and use PHP.)

--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~     / \/ _ o     ~          Live from Albuquerque, NM!          ~
~     _ /\   |     ~                                              ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Business E-mail  ~ daniel @ "Business Website" below            ~
~ Business Website ~ http://www.djs-consulting.com                ~
~ Tech Blog        ~ http://www.djs-consulting.com/linux/blog     ~
~ Personal E-mail  ~ "Personal Blog" as e-mail address            ~
~ Personal Blog    ~ http://daniel.summershome.org                ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~

GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ !O M--
V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e h---- r+++ z++++

"Who is more irrational?  A man who believes in a God he doesn't see,
or a man who's offended by a God he doesn't believe in?" - Brad Stine

Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
01-12-08 02:56 AM


Re: OT Java, C#, C++
Pete Dashwood wrote:
>, but I
> specifically like certain features of C# (better IDE and Debugging, FOREAC
H
> for iterating over collections... SO easy,

You know that the latter is pretty easy in Java too, right?  :)

for (SomeObject oObj : oObjCollection) {
// do something with the object
}

or

Iterator<ObjectType> iterObj = ObjectType.Iterator();

while (iterObj.hasNext()) {
ObjectType oObj = iterObj.next();
// do something with the object
}

Of course, the "for" is much less code.

--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~     / \/ _ o     ~          Live from Albuquerque, NM!          ~
~     _ /\   |     ~                                              ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Business E-mail  ~ daniel @ "Business Website" below            ~
~ Business Website ~ http://www.djs-consulting.com                ~
~ Tech Blog        ~ http://www.djs-consulting.com/linux/blog     ~
~ Personal E-mail  ~ "Personal Blog" as e-mail address            ~
~ Personal Blog    ~ http://daniel.summershome.org                ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~

GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ !O M--
V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e h---- r+++ z++++

"Who is more irrational?  A man who believes in a God he doesn't see,
or a man who's offended by a God he doesn't believe in?" - Brad Stine

Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
01-12-08 02:56 AM


Re: OT Java, C#, C++
"Pete Dashwood" <dashwood@removethis.enternet.co.nz> wrote in message
news:5uqebmF1j2oi5U1@mid.individual.net...
>
>
> "William M. Klein" <wmklein@nospam.netcom.com> wrote in message
> news:I%Phj.255354$He.247582@fe08.news.easynews.com... 
>
> Speaking for myself, "Yes". (Its where the market is...) 
>
> Possibly Java, but more likely C#. It has arguably better facilities than
> Java (although this is subjective; both languages are excellent), but I
> specifically like certain features of C# (better IDE and Debugging,
> FOREACH for iterating over collections... SO easy, and very easy-to-write
> event handlers. Mainly, I like the succinct, easy-to-read code and the
> fact that everything is typed. Stuff (even complex machine oriented stuff)
> just works...
>
> If the User had Java already, and/or expressed a preference for NO C#,
> then I'd use Java. 
>
> Based on a sample of one :-) written totally as an experiment, but a real
> application...:
>
> 1. C# developed on a Windows platform and NOT using unmanaged code
> (specifically, InterOp Services) or platform-specific Classes, runs
> perfectly on any Windows platform running the appropriate version of
> DotNET.
>
> 2. The SAME C# Assembly runs correctly on a machine running Mono/Linux,
> WITHOUT recompile or reconfiguring.
>
> C# is accelerating in popularity for a number of reasons, and
> cross-platform capability is just one aspect of it.
>
> I only wish I had got into it sooner; I could have saved myself a lot of
> aggravation with OO COBOL.
>
> Pete.
> --
> "I used to write COBOL...now I can do anything."
>
>

Java has a similar idion for iterating over collections.  I think it came
with version 5.



Report this thread to moderator Post Follow-up to this message
Old Post
Charles Hottel
01-12-08 02:56 AM


Re: OT Java, C#, C++

"LX-i" <lxi0007@netscape.net> wrote in message
 news:U8idnbEUQcjsvhXanZ2dnUVZ_q2hnZ2d@co
mcast.com...
> Pete Dashwood wrote: 
>
> You know that the latter is pretty easy in Java too, right?  :)
>
Yes :-)

But C#  FOREACH has more elegance...

(You CAN use the same "iterator" (enumerator) approach in C#, but I still
prefer FOREACH.)

Pete.
--
"I used to write COBOL...now I can do anything."



Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
01-13-08 12:55 PM


Re: OT Java, C#, C++
"Pete Dashwood" <dashwood@removethis.enternet.co.nz> wrote:
> "LX-i" <lxi0007@netscape.net> wrote: 
>
> Yes :-)
>
> But C#  FOREACH has more elegance...
>
> (You CAN use the same "iterator" (enumerator) approach in C#, but I still prefer F
OREACH.)

Do you see some difference between FOR EACH as implemented in C#
vs. VB?
--
Judson McClendon       judmc@sunvaley0.com (remove zero)
Sun Valley Systems     http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."



Report this thread to moderator Post Follow-up to this message
Old Post
Judson McClendon
01-13-08 11:56 PM


Re: OT Java, C#, C++

"Judson McClendon" <judmc@sunvaley0.com> wrote in message
news:oUqij.51733$_m.37436@bignews4.bellsouth.net...
> "Pete Dashwood" <dashwood@removethis.enternet.co.nz> wrote: 
>
> Do you see some difference between FOR EACH as implemented in C#
> vs. VB?

I think Anders probably realized that VB's "for each" is a very useful
construct and included it in C# as a kind of high level "collection
processor".

To answer your question, no, I see very little difference, but I'm not
expert with VB. Certainly in C# automatic enumeration happens under the
covers (as it probably does with VB). I like the syntax in C#.:-)

Pete.
--
"I used to write COBOL...now I can do anything."



Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
01-13-08 11:56 PM


Re: OT Java, C#, C++
On Jan 12, 1:01 pm, "Pete Dashwood"
<dashw...@removethis.enternet.co.nz> wrote:
> "William M. Klein" <wmkl...@nospam.netcom.com> wrote in messagenews:I%Phj.
255354$He.247582@fe08.news.easynews.com...
> 
> 
> 
> 
>
> Speaking for myself, "Yes". (Its where the market is...)
>
>
> 
>
> Possibly Java, but more likely C#. It has arguably better facilities than
> Java (although this is subjective; both languages are excellent), but I
> specifically like certain features of C# (better IDE and Debugging, FOREAC
H
> for iterating over collections... SO easy, and very easy-to-write event
> handlers. Mainly, I like the succinct, easy-to-read code and the fact that
> everything is typed. Stuff (even complex machine oriented stuff) just
> works...
>
> If the User had Java already, and/or expressed a preference for NO C#, the
n
> I'd use Java.
>
>
> 
>
> Based on a sample of one :-) written totally as an experiment, but a real
> application...:
>
> 1. C# developed on a Windows platform and NOT using unmanaged code
> (specifically, InterOp Services) or platform-specific Classes, runs
> perfectly on any Windows platform running the appropriate version of DotNE
T.
>
> 2. The SAME C# Assembly runs correctly on a machine running Mono/Linux,
> WITHOUT recompile or reconfiguring.

While it is possible to write C# programs that will run identically on
both, it is also possible to write perfectly good programs which are
locked to 'Windows only'.

Partly this is because Mono will always be behind the latest Windows
stuff, but also because Mono doesn't/can't use the Windows API as can
be done.

If, however, one used the GTK+ windowing subsystem then it will run on
both.

> C# is accelerating in popularity for a number of reasons, and cross-platfo
rm
> capability is just one aspect of it.

When MS implemented their Java as J++ they added 'Windows Only' stuff
into it and failed to indicate that this was not cross-platform in the
expectation that they could have it both ways: alleged 'cross-
platform' _and_ Windows Only lockin.

Mono is supplying that for MS. In theory cross-platform, in practice
Windows only (unless special care is taken).

> I only wish I had got into it sooner; I could have saved myself a lot of
> aggravation with OO COBOL.
>
> Pete.
> --
> "I used to write COBOL...now I can do anything."


Report this thread to moderator Post Follow-up to this message
Old Post
Richard
01-13-08 11:56 PM


Re: OT Java, C#, C++

"Richard" <riplin@azonic.co.nz> wrote in message
news:c870ef8d-4cd4-4f97-a757-fa706a81aaa4@l32g2000hse.googlegroups.com...
> On Jan 12, 1:01 pm, "Pete Dashwood"
> <dashw...@removethis.enternet.co.nz> wrote: 
>
> While it is possible to write C# programs that will run identically on
> both, it is also possible to write perfectly good programs which are
> locked to 'Windows only'.
>
> Partly this is because Mono will always be behind the latest Windows
> stuff, but also because Mono doesn't/can't use the Windows API as can
> be done.
>
> If, however, one used the GTK+ windowing subsystem then it will run on
> both.
> 
>
> When MS implemented their Java as J++ they added 'Windows Only' stuff
> into it and failed to indicate that this was not cross-platform in the
> expectation that they could have it both ways: alleged 'cross-
> platform' _and_ Windows Only lockin.
>
> Mono is supplying that for MS. In theory cross-platform, in practice
> Windows only (unless special care is taken).
> 
>

I really don't know enough about Mono to argue this, Richard, and I accept
what you say.

It seems a pity.

Not familiar with GTK+ either. How could I access this from a Windows
environment in C# (thought I might give it a try...)?

Pete.
--
"I used to write COBOL...now I can do anything."



Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
01-14-08 11:56 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:01 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.