Autor Beitrag
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 27.04.07 20:28 
Ich möchte mit C# anfangen.
Die Sprache gefällt mir gut und man erweitert seinen technischen Horizont. ;)
1. Welche IDE empfehlt ihr mir?
2. Welche Nachteile hat C#?

Was fällt euch sonst noch für mich ein?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
r2c2
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 324
Erhaltene Danke: 2

Linux

BeitragVerfasst: Sa 28.04.07 09:34 
Hallo Marco,

user profile iconMarco D. hat folgendes geschrieben:

1. Welche IDE empfehlt ihr mir?

SharpDevelop oder Visual CSharp Express. Beide kostenlos. Was man bevorzugt is eher Geschmacksage. Guck dir einfach mal beides an...


Zitat:

2. Welche Nachteile hat C#?

Schwirige Frage. Also, wenn man von Delphi kommt vermisst man (bzw. hab ich vermisst) Mengentypen und flexible Arrays(enums als Indices, etc.). Kommt man wieder zurück nach Delphi fehlen einem Generics und Operatorenüberladung. Man könnte das noch weiter ausführen, aber kurz gesagt: C# is einfach eine andere Sprache und deshalb wohl am Anfng etwas ungewohnt, aber man findet sich eigentlich recht schnell rein. Probiers einfach mal aus...

mfg

Christian

_________________
Kaum macht man's richtig, schon klappts!
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 28.04.07 10:00 
user profile iconr2c2 hat folgendes geschrieben:

Schwirige Frage. Also, wenn man von Delphi kommt vermisst man (bzw. hab ich vermisst) Mengentypen und flexible Arrays(enums als Indices, etc.).

Du meinst mit Mengentypen:
ausblenden Delphi-Quelltext
1:
2:
type
  TWochentag = (wMontag,wDienstag,wMittwoch);

?
Was sind 'flexible Arrays'? Ich kenne nur dynamische Arrays. :P
user profile iconr2c2 hat folgendes geschrieben:

Kommt man wieder zurück nach Delphi fehlen einem Generics und Operatorenüberladung.

Generics vermisse ich wirklich jetzt schon in Delphi. ;)
Operatorenüberladung - kann ich nichts zu sagen, da ich so etwas noch nicht gemacht habe. ;)

Wie sieht es denn mit der Geschwindigkeit aus?

Also C# => .NET => nicht compiliert => sondern Zwischencode => langsamer.

Kann man das so sagen? Oder ist das nichts dran?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
r2c2
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 324
Erhaltene Danke: 2

Linux

BeitragVerfasst: Sa 28.04.07 15:21 
user profile iconMarco D. hat folgendes geschrieben:

Du meinst mit Mengentypen:

Nö. Dasn Aufzählungstyp auch enum genannt...
==> set of...

Zitat:

Was sind 'flexible Arrays'? Ich kenne nur dynamische Arrays. :P

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var
  Test: array[Boolean] of string;
  Test2: array[TEnum] of TSonstwas;
  Test3: array['a'..'z'of Integer;
  ...

Sowas kenn ich nur von Pascal-Dialekten...

Zitat:

Wie sieht es denn mit der Geschwindigkeit aus?

Besser, wie man vielelicht denkt. Der "Zwischencode"(IL-Code) wird JIT-kompiliert, nicht JIT-interpretiert. Außerdem können duch das JIT-kompilieren Optimierungen vorgenommen werden, die sonst nicht möglich wären(ein Delphi.Win32-Prog is im Allgemeinen aufn P1 optimiert; auch, wenns aufm P4, m Athlon oder nem Code2Duo läuft). Dadurch ist .NET gar nicht so viel langsamer als Win32...

mfg

Christian

_________________
Kaum macht man's richtig, schon klappts!
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 28.04.07 15:34 
Was macht denn folgende Zeile?
ausblenden Delphi-Quelltext
1:
2:
var
  Test: array[Boolean] of string;

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: Sa 28.04.07 15:44 
Streng doch mal ein wenig deine Phantasie an, mit welchen Indizes wird man wohl auf dieses Array zugreifen können ;) ?
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 28.04.07 15:58 
user profile iconKhabarakh hat folgendes geschrieben:
Streng doch mal ein wenig deine Phantasie an, mit welchen Indizes wird man wohl auf dieses Array zugreifen können ;) ?

Na so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var
  Test: array[Boolean] of string;
  blubb: string;

blubb := Test[false];

Das sieht aber sehr komisch aus. :eyecrazy: Wer benutzt denn sowas? Ich hätte nicht gedacht, dass sowas möglich ist. :P

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
r2c2
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 324
Erhaltene Danke: 2

Linux

BeitragVerfasst: Sa 28.04.07 16:14 
Kann man wunderbar als Konstante benutzen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
const
  InsertStateStr : array[Boolean] of string = ('überschreiben''einfügen');
begin
  ShowMessage(InsertStateStr[true]);


mfg

Christian

_________________
Kaum macht man's richtig, schon klappts!
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: So 29.04.07 00:53 
Was ich als Vorteil von C# noch nennen würde, wären schlichtweg die Klassen des .NET Frameworks. Mit der Version 2.0 hat man schon einiges in der Hand.
Der Syntax ist zwar (wie alle, die an C,... angelehnt sind) etwas gewöhnungsbedürftig, aber ich mag ihn zunehmend immer mehr ;)

Gruß
alias5000

_________________
Programmers never die, they just GOSUB without RETURN
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 29.04.07 10:36 
user profile iconalias5000 hat folgendes geschrieben:

Der Syntax ist zwar (wie alle, die an C,... angelehnt sind) etwas gewöhnungsbedürftig, aber ich mag ihn zunehmend immer mehr ;)

Wobei die Syntax teilweiseauch Delphiähnlich ist
ambig
Hält's aus hier
Beiträge: 6



BeitragVerfasst: Sa 02.06.07 03:26 
Zitat:

ausblenden Delphi-Quelltext
1:
2:
3:
var
  Test: array[Boolean] of string;
  ...

Sowas kenn ich nur von Pascal-Dialekten...


hallo r2c2,

sowas kann in c# doch sehr leicht implementiert werden.
am ehesten passt da sogar schon

Dictionary<bool, string>.
r2c2
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 324
Erhaltene Danke: 2

Linux

BeitragVerfasst: Sa 02.06.07 10:41 
user profile iconambig hat folgendes geschrieben:

hallo r2c2,

sowas kann in c# doch sehr leicht implementiert werden.
am ehesten passt da sogar schon

Dictionary<bool, string>.

Hm... du hast Recht, aber funktioniert das auch mit konstanten? Wohl eher nicht...
Wobei ich zugeben muss, dass man sich das relativ leicht nachbauen kann. Generics sind wirklich praktisch. Vllt gibts die ja auch irgendwann in Delphi...

mfg

Christian

_________________
Kaum macht man's richtig, schon klappts!