- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
In case-sensitive source, you can search for, say, "End", and only get "End".
In case-insensitive source, you get to search for "end", then sort through ten times the number of results as you uncover every single instance of the word in dialog boxes, message strings, etc.
Admin
Admin
C#'s design has absolutely nothing to do with 'converging to BASIC'.
C# and the CLR were both designed by Anders Hejlsberg, who was previously involved with the language design of Turbo Pascal, Delphi and Visual J++. He has repeatedly stated in interviews and technical papers that the drive behind the fundamentals of the CLR and in turn the C# language design were the flaws he experienced in languages such as C++, Java, Delphi and Smalltalk.
VB.NET also happens to run on the CLR, but in reality is nothing more than a bad publicity stunt meant to cater to the rather large clique of VB6 developers and shops scared of (or incapable of) change. It has nothing to do with the ideas behind the CLR and C# and everything to do with retaining developers on the Microsoft platform.
Admin
My first WTF is.. Delphi 7? That's like.. 2002.
It's equivalent saying you're still using VB6.
Maybe XE3 is a bit new, but even 2010 gives you 8 years of advancement.
Delphi does have a break statement, btw. It's how you break out of loops early. Rarely gets used since the try/finally stuff is the normal way to do it.
My second WTF is.. that compiled? I'm sceptical but not sceptical enough to fire up delphi and try it.
Admin
The article has since been edited. It was definitely missing yesterday.
Admin
Beside the fact that Delphi is easier, more capable, and more elegant than Java and .Net?
Admin
Leaving whether those claims are valid in the middle, you could claim that the VCL is more elegant than the .NET framework or you could claim that Delphi is more elegant than C# or one of the many other languages for which there is CLR support.
However, comparing a language against a framework makes no sense.
Admin
It's nothing compared to Haskell!
Admin
The issue with Pascal is that it was never meant as a programming language for business applications. The fact that an integer is only 16 bits (-32768 to 32767) is an example of such a limitation.
Niklaus Wirth took this criticism to mind when he designed Modula-2, because that one has a Cardinal type that is still only 16 bits, but has values from 0 to 65535.
Apparently, this limitation is totally arbitrary, and based on the specific hardware that the first Pascal compiler was implemented on.
Admin
The case sensitivity is used in languages such as Java, for example, as a matter of convention. Classes should start with a capital, whereas instances should start with a lower case letter. So you can have the following declaration:
where 'Object' is the class, and 'object' is the name of the instance. I use this a lot in my code, because it saves me from having to come up with a meaningful instance name that is different from the class name.
Admin
You have to pronounce the F louder than the f. Of course, clever people use case sensitivity to produce optimal code, since it is sooo useful to have Func(), func(), FUNC() performing differents tasks, for example. It also allows more variables, if you are found in short (one letter) names: a,A,b,B,c,C... a quality jump towards legibility.
Admin
Admin
C# and the .NET CLR are based on lessons learned from problems with C++, Delphi (i.e. Object Pascal), Smalltalk and Java. There is no Basic in that story at all.
Admin
I always assume that if I can't think of a meaningful name, then I'm doing something wrong.
Admin
And now, it's time for a breakdown: http://www.youtube.com/watch?v=Xpugp6DIb3I&feature=youtu.be&t=3m6s
Admin
Sure it was useful to figure out that systems programming and some kinds of applications benefit from having unsigned types together with signed types ... hmm, did .Net figure that out yet? I haven't used .Net for a few years but I recall warnings from C# or C++/CLI that unsigned types weren't compatible with .Net.
Meanwhile, C was standardized so that int would be at least 16 bits and short would be at least 16 bits, but it was still allowable for a machine with 36-bit words to make short and int both be 36 bits.
I don't recall any Pascal standard requirement for MAXINT, but 2147483647 was allowable.
Admin
Admin
System.UInt16, System.UInt32 and System.UInt64 have been part of .NET and C# since its inception and are used quite a lot during interop with unmanaged code.
They are not CLS compliant, sure. However, that only means you may encounter languages running on the .NET CLR that cannot work with them. The .NET framework itself has no problem with them and neither does C#...
Admin
I don't have .Net on any of my computers except a VM that runs Windows. I use Delphi in that VM to create OSX and iOS apps that run on my Mac and iPhone. Why would I try to use .Net or Java to create an iOS app? Or .Net to create an OSX app?
Admin
You're hired :D
Admin
AFAIK it was Borland's Pascal compilers (which don't really have much in common with Wirth's actual Pascal language to start with) running on 16 bit Dos that naturally had 16 bit integers.
Later on the so called "Free Pascal Compiler", in its zeal to bring the power of Dos to modern 32 bit systems made integer 16 bit too and that made many Pascal programmers think this was an actual limitation of the language. (Disclaimer: I don't know if they've upgraded to 32 bit meanwhile. It's been a few years I'd looked at it.)