• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

C#

Started by Rick McNeely, December 09, 2012, 12:32:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rick McNeely

I don't have the benefit of working with other programmers.  Much less more experienced programmers.  So I have a question for those of you who have been working with object oriented languages.

When I view tutorials for C# and other object oriented languages, I get the impression that developers spend most of their time creating objects as well as utilizing existing objects, avoiding any significant procedural code like the plague.  But when I use C# (or C++) I find that I still write procedurally (perfectly cromulent word), while using existing objects and occasionally creating objects of my own. 

Is this typical?  Or should I be finding ways to further 'objectify' my code.

Paul Squires

I am certanly no C# expert because I have only been using it for the past two weeks since the PB announcements started. It is my Plan "B". Everything in C# is OOP. Everything. It is easy to create procedural style code (as you know) by just creating a static class.

I am totally impressed with C# so far. I am converting one of my work programs from PB/FireFly over to C# (using SharpDevelop as the IDE) as a means of learning the language. There is an enormous amount of tutorials and examples on the web which is making the process pretty easy.

...it is wierd getting used to the curly braces and semicolons though.  :)

Paul Squires
FireFly Visual Designer SQLitening Database System JellyFish Pro Editor
http://www.planetsquires.com

Tom Cone Jr

Paul,

Why C# instead of VB.NET ?

-- tom

Paul Squires

Quote from: Tom Cone Jr on December 09, 2012, 03:59:40 AM
Paul,

Why C# instead of VB.NET ?

-- tom

I considered VB.NET. A lot of the syntax is familiar.

I figured that if I was going to learn .NET programming then I may as well learn the most popular .NET language - therefore, I chose C#. The web has an incredible amount of C# support forums, documentation, examples, tutorials, books, add-ons, components, etc.

I had briefly considered Java. I looked at FreePascal.

Actually, learning C# has kind of got my programming juices flowing again. It's nice to be excited about programming again.

This is now my second week with C# and it is not hard to learn at all. Sure, the braces and semicolons take a bit of getting used to but after a short time it becomes second nature. Most the rest of the learning is simply learning the syntax for things you already know about like FOR/NEXT and WHILE LOOPS, etc.

C# is a fully enabled OOP language. The biggest learning for me is not C# but rather learning the .NET framework. There are sooooooooo many built in classes, methods, properties, namespaces... that just about anything you can think of doing has a corresponding .NET class to help - the problem is trying to find it. I'm getting pretty good with Google and MSDN searches.   :)
Paul Squires
FireFly Visual Designer SQLitening Database System JellyFish Pro Editor
http://www.planetsquires.com

Tom Cone Jr


Patrice Terrier

My C# corner

If i could have used the C# syntax without the .Net framework, then i would have switched for long, but you know as i am using mostly "unsafe" code (flat API)  i never used it for production.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Carlo Pagani

I'm with you Patrice so I am looking at http://msdn.microsoft.com/en-us/vstudio/hh386302 because I too am not fanatical about .NET. I think it is a difficult decision to make!

Patrice Terrier

#7
Carlo

On the long term i think C++ is what make the more sense for a SDK coder, i already started to learn it two years ago, but delayed the big jump in the hope that we were close to a 64-bit version of PB.

I shall wait until the end of this month, but if nothing new, then perhaps we could go on from the VS2010 thread i have already started here:
http://www.jose.it-berater.org/smfforum/index.php?topic=3793.0

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Rick McNeely

I do like C++.  I took a course in it at my Community College.  But I REALLY like the platform independence of C#, especially when combined with wxWidgets.  Most of my applications are slowed by networks, database servers, etc..   Being hyper-fast isn't much of a benefit in situations like that.  You just spend more time waiting for some other process.

I've also been doing some Python work.  If better debugging were available, that could be an awesome language.  I wrote a Python application on my Windows 7 machine, copied it over to my CentOS box and it ran with zero modification.  The application uses sockets and an SQLite database.  That is pretty awesome.

James C. Fuller

Paul,
  What C# compiler are you using?

James

Juergen Pfisterhammer

Hello,

I use C# and Java within my daily work. They are ok. But the greatest features from PowerBasic such a low level programming and the speed are missing in my opinion. They both use an interpreter.

One alternative to PowerBasic is PureBasic. It has a 32 and 64 bit compiler for Windows / Linux and MacOSX. The compiler can compile Executables and Libraries.

But only a suggestion because I hope that PowerBasic goes on.

James Klutho

My attraction to Powerbasic has been string handling, the forum for code help, and knowing for sure that any problem with my project was my fault and not the compiler's fault.  I bought a Purebasic license eons ago but never really used it.  The bug list on the forum would make my head swim, the forum was basically hobbyists, and the non standard basic syntax (like blitzbasic) was a big turnoff.  I guess if you needed a 64 bit dll it could be an option, but if my memory serves me, the dll handling was also screwy. Jim

Paul Squires

Quote from: James C. Fuller on December 09, 2012, 09:34:29 PM
Paul,
  What C# compiler are you using?

James

I didn't realize that there were C# compilers other than Microsoft's. I am using SharpDevelop for the IDE.
Paul Squires
FireFly Visual Designer SQLitening Database System JellyFish Pro Editor
http://www.planetsquires.com

James C. Fuller

#13
Paul,
  Maybe I should rephrase that. How did you acquire the C# compiler?
I assume because you do professional coding you have purchased one of the retail versions of Visual Studio?
For those with more modest means it seems the Express suite would be a possibility; but ( I assume again :)) you would then  have the same restrictions you have with the Express C++: No 64bit??

I found there is a free one:

http://www.mono-project.com/CSharp_Compiler

I think Patrice is on the correct path with C++.

I just uninstalled VS Express and installed Win7.1 SDK which includes the C++ compiler. I now can compile both 32 and 64 bit apps and dll's.


James

Patrice Terrier

Patrice is currently trying to learn how to create a plain (flat API) Win32 DLL without MFC using VS2010.
Any tutorial welcome  :)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com