Recent

Author Topic: FPC vs C#  (Read 45553 times)

kapibara

  • Hero Member
  • *****
  • Posts: 656
FPC vs C#
« on: July 02, 2014, 04:37:05 am »
Hope I dont start something serious here. :)

What does C# have over ObjectPascal? I must have missed something.

When I quit programming 2002, why did everyone install and get stuck with C# and VisualStudio? I installed it too, but didnt particularly like it and removed it. It simply reminded me of my 6 improductive years with C/C++ in the early 90's, before Delphi. When I switched from C++ to Delphi, apps were developed at double the speed, double the features and half the bugs. I realized productivity would suffer with C#. Ten years later I'm doing some programming again and I still dont get it. I hugely prefer ObjectPascal over C#.

I'm talking about the language, not the IDE or size of the company that supports the IDE/Language.
« Last Edit: July 02, 2014, 04:59:13 am by kapibara »
Lazarus trunk / fpc 3.2.2 / Kubuntu 24.04 - 64 bit

chenyuchih

  • Jr. Member
  • **
  • Posts: 83
Re: FPC vs C#
« Reply #1 on: July 02, 2014, 06:52:31 am »
I think an important reason is that the C# byte code can run cross-platform without being re-compiled, just like Java. Native-code languages(not only  Object Pascal, but also C/C++, Fortran... etc.) are all need to be compiled again for new architecture or OS, so libraries without source code are not so convenient to use.

Besides, Java need a VM environment, which need to be installed additionally, but C#'s framework are already part of MS' modern OSes.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12715
  • FPC developer.
Re: FPC vs C#
« Reply #2 on: July 02, 2014, 11:25:20 am »
Hope I dont start something serious here. :)

What does C# have over ObjectPascal? I must have missed something.

Microsoft prefered platform.

Quote
When I quit programming 2002, why did everyone install and get stuck with C# and VisualStudio?

Note though that many C# users didn't upgrade from C++ but from VB.  The VB.NET/C# ratio is much smaller than the VB/C++ was.

The market share of VS was already rising before C# (mostly because new entrants defaulted to Microsoft tools in Action Packs that also included SQL Server etc), a fresh new environment only accelerated that.

I don't think the language, or even the bytecode VM technology really mattered that much (e.g. Apple did the same with Objective C that is native)

Quote
I installed it too, but didnt particularly like it and removed it. It simply reminded me of my 6 improductive years with C/C++ in the early 90's, before Delphi. When I switched from C++ to Delphi, apps were developed at double the speed, double the features and half the bugs. I realized productivity would suffer with C#. Ten years later I'm doing some programming again and I still dont get it. I hugely prefer ObjectPascal over C#.

IMHO there is barely a relation between C# and C++ except some superficial syntax (like curly braces). C# is best compared to Java, of which it is pretty much a clone.
« Last Edit: July 02, 2014, 11:27:34 am by marcov »

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: FPC vs C#
« Reply #3 on: July 02, 2014, 12:22:56 pm »
One thing I do know about C# is it's dependency for .Net framework on the windows platform. This could be a problem for people using the latest C# but writing for older systems that might not be able to carry the latest framework.

Basile B.

  • Guest
Re: FPC vs C#
« Reply #4 on: July 02, 2014, 12:38:07 pm »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12715
  • FPC developer.


hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: FPC vs C#
« Reply #7 on: July 02, 2014, 03:02:30 pm »
C# has automatic memory management while
Object Pascal does not have automatic memory management

C# has lambda functions
C# has mature generics & constraints for generics

Quote
apps were developed at double the speed, double the features and half the bugs
I know people who claim that transition from Delphi to C# has this effect
« Last Edit: July 02, 2014, 03:05:15 pm by hinst »
Too late to escape fate

Nebula

  • Jr. Member
  • **
  • Posts: 88
Re: FPC vs C#
« Reply #8 on: July 02, 2014, 03:31:28 pm »
Strength in numbers, knowing that if the excellent on-line docs can't help then countless online forums are also there for you, tutorials, code snippets in blog entries, etc.

VS is also an excellent IDE.

The free Express versions allow a no-cost entry.

Plus, there's the Marketable Skills angle. If you become very proficient in .Net you have more chance of getting a job than if you only have Pascal on your CV/resume - so you feel that any effort to learn it is not wasted. Sad but inevitable and true. Laz./FPC would have to compete with all that if there was a desire to "hit the big time".

I'm working in VB.net and it still surprises me how easy it usually turns out to be, after getting stuck for a few minutes. The syntax differences between Pascal and VB don't amount to any great issue, it's all code :)

I hugely admire the progress of Laz/FPC though, and still want to see it leap from strength to strength.
Newbie testing Lazarus v1.0 - very impressed
Win 7 at work, XP and Linux Mint at home.
It all started with a ZX80 on a b/w telly........
Code: [Select]
Uses Smiles, GoodHumour, WantsToHelp;
{ never liked C - curly brackets are for comments! }

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: FPC vs C#
« Reply #9 on: July 02, 2014, 06:41:04 pm »
It's actually Object Pascal spirit in the C family language (check the inventor), well with other influences everywhere. What does it have over Object Pascal? Other than hinst has pointed, from the language point of view nothing meaningful. The primary reason people choose C# because it's the de facto (and de jure I guess) language of .NET framework and of course M$ pushes all of its clients to use it. Even they mention that moving from VB to VB.NET is just as difficult as moving from VB to C# and recommend VB programmers to move to C# instead (which doesn't seem to work).

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: FPC vs C#
« Reply #10 on: July 02, 2014, 07:24:40 pm »
There's no sugar-like serialization in FPC, though it's native to C#

MS also introduced LINQ extension. Not sure if it can be considered as a part of the language though.

And yes... namespaces. C# modules are a bit different to Pascal modules.
« Last Edit: July 02, 2014, 07:26:30 pm by skalogryz »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: FPC vs C#
« Reply #11 on: July 02, 2014, 07:48:56 pm »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12715
  • FPC developer.
Re: FPC vs C#
« Reply #12 on: July 02, 2014, 08:33:28 pm »
C# has automatic memory management while
Object Pascal does not have automatic memory management

I never saw universal GC as an undisputable pro. At least not in general purpose languages.

Quote
C# has lambda functions

Fun, but limited. Played a bit with linq, but seemed more a gimmick than a feature.

Quote
C# has mature generics & constraints for generics

True. At least the MS implementations.

Quote
Quote
apps were developed at double the speed, double the features and half the bugs
I know people who claim that transition from Delphi to C# has this effect

I also know people that claim the opposite, and came back to Delphi, citing deployment as a major reason.
« Last Edit: July 02, 2014, 10:01:49 pm by marcov »

Laksen

  • Hero Member
  • *****
  • Posts: 802
    • J-Software
Re: FPC vs C#
« Reply #13 on: July 02, 2014, 08:49:16 pm »
LINQ is poison for production code.

Garbage collection is slow and its only saving grace is that it makes multithreading very easy.

Generics is alright. Wish we had that in mode ObjFPC without specialization... :)

airpas

  • Full Member
  • ***
  • Posts: 179
Re: FPC vs C#
« Reply #14 on: July 02, 2014, 11:55:43 pm »
Quote
Wish we had that in mode ObjFPC without specialization
that was my wish too long time ago .

i am using c/c++ right now , but i am watching fpc/laz news constantly.

 

TinyPortal © 2005-2018