- 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
A search tool not being able to perform case-insensitive searches is crap. It also is Crap and CRap and CRAp and CRAP! Major CRAP!
Admin
Hmm, short easily readable interface name? Check. Interface does what its name says it dies? Check.
Where's the problem? That an interface that breaks things.
Admin
Admin
All of this relates to:
http://www.lysator.liu.se/c/bwk-on-pascal.html
The title of which is "Why Pascal is not my favorite language". One can infer that since Delphi is derived from Pascal, it too would be on Brian W. Kernighan's list.
History may prove him correct.
Admin
sigh
foreach (var entry in records) { entry.MarkInactive(); ActiveEntryIndex.Remove(entry); InactiveEntryIndex.Add(entry); var email = EmailerService.CreateInactiveEntryEmail() { ... } }
or
foreach (var entry in records) { MoveEntryToInactive(entry); SendAlertEmail(entry); }
Admin
I argue that this is a) wrong (you can search for "break" (case-insensitive!) in that 1000 lines) and your point to break up that code only shows that the code is bad quality and should be restructured anyhow.
If you do this restructuring, you must however find a replacement for that break.
So it's not the break that is the problem, it is the 1000 lines of code in the loop.
break-ing loops is not a bad practice in itself, but if your code is so complicated that it needs to be refactored, you need to replace it with something different.
Admin
Admin
Incorrect. The parenthesis are optional in this case. It's correct to invoke the function with or without parens.
That's a feature, not a bug. TRWTF is case sensitivity. The identifier is the same word no matter how it's capitalized, and case insensitivity means you can't pollute your namespace with abuses of case sensitivity. It drives me up the wall when I see someone doing something like this in C code: HWND hwnd;
Break is not a procedure, and it's difficult to imagine how it could be implemented as one. It's a compiler-magic directive that, like most of the basic language, is placed in the System namespace by default. This mis-mapping isn't confusing at all if you understand how Delphi's module system works, but considering the number of outright mistakes in your comments, it's clear you don't understand anything about Delphi and you think it's just old-school Pascal with some something-or-other added in.
Admin
If you're going to bring up history, let's look at Kernighan's history. As the author of the definitive book on C programming, with a direct financial stake in the success of the language, he can hardly be trusted as an objective source of information about C's biggest (at the time) competitor in the programming language space.
Admin
I don't think it is the kind of problem the author thinks it is.
Get a little bit above the situation.
Yes, a developer has the right to introduce some kind of dsl; break is one of the keywords of that new dsl.
Whether the reader, as the author of this wtf, is able to understand the other person's code is the other story. And of course the original author might have kept in mind that new generations of ignorant idiots will come over and start laughing at what they don't grok. That's life, too.
Admin
Admin
I know that it breaks, but to say that it dies is a bit dramatic.
Admin
The reason case sensitivity matters: Polish polishers polish Polish polishings.
Polish - someone from poland. polish - makes things shiny.
Lets say I have a rock polishing company in poland.
I want to implement a system to give priority to polish Polish rocks over polishing international rocks.
It gets a little confusing without case sensitivity to infer meaning.
Admin
How could your pedantic statement leave out digraphs?!?!?!?!?!
Admin
We're talking about variables and keywords, not string values. It's completely different.
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
Admin
My MacBook Pro would like a word with you.
Admin
Admin
He said "computer", not "PlaySkool toy."
Admin
No, Delphi is not case-sensitive.
Admin
I'll bet the famed Oracle of Delphi predicted this....
Admin
So have you, apparently. Delphi.NET was discontinued several years ago. .NET/CLR support is now handled by a completely different product named Delphi Prism, which is a Visual Studio add-on based on RemObjects Oxygen.
Admin
Although I agree with the first part of not being able to imagine a legit reason to use Delphi (yes - I'm a reformed Delphi guy), the idea of having something preinstalled doesn't gel.
Delphi actually compiles to native binaries. You don't need a runtime in order to execute a Delphi app like you do with C# or Java. So, the fact those are preinstalled - and likely out of date - is meaningless.
For me, the reason I don't program with Delphi anymore boils down to a serious number of bad releases (all of the even numbered ones sucked monkey balls) and bugs in their core libraries that persisted through at least version 8 when I left the fold. One quick example is that every other language had easy to use IP communications built in. As of D8, what they had was of such crap that no one ever used it - and that is a pretty f*ckin basic library.
Admin
OTOH, maybe I should start naming variables and functions with names like "Print", "Echo" and so on. That would make the resulting code fun to read... printf("%s %s", PrintF(HWND), Var); Printf(var);
(One of the reasons I prefer Delphi/Pascal over other languages is the fact that the identifiers are not case sensitive).
Admin
Nah, using break breaks program as we've seen today, but when using continue, they'll continue to work!
Admin
If you are referring to the TTCPClient and TTCPServer components of CLX's Sockets unit, then I totally agree. Those components are total crap. However, the original TClientSocket and TServerSocket components of the VCL's ScktComp unit are still available (though they have to be installed manually if you still want to use them), and also Indy (http://www.indyproject.org) has been bundled in every version of Delphi since v6.
Admin
You might try reading the article. I have, and his points are very good.
Admin
Break IS part of Delphi - it is used to exit from loops (for, while or repeat) early - similar to its use in C and other {languages} . It isn't however part of "Standard Pascal" as defined by Wirth.
Admin
As have I (a while ago)- However AS I KNOW Delphi, I know almost all of his criticisms are no longer relevant. Many may not have been relevant when it was written, he just didn't know the language well enough, but I haven't worked in standard Pascal since the mid 80s so I can't remember!
e.g. Delphi has
Admin
It's the difference between sExchange() and SexChange()
Admin
You actually missed one thing: The language uses "end" in some cases without matching "begin" statement.
Admin
Yeah well... what you do expect from a language that is derived from a language designed by a guy whose last name is roughly pronounced as "weird"?
Admin
Looks like it's time to get your eyes tested.
Admin
Admin
Admin
Admin
It's not possible to add just "break" in the source that will refer to the Word (automation) DLL function "break". "Break" is a part of an interface and there should be above something like:
With MyWordInstance do Begin -->Break;
Admin
Equally interesting, his praise for C is no longer relevant:
*library functions are ported into the compiler for improved code generation
*linking is ported into the compiler for improved code generation
*there is a standard C library
*restrictions are placed on the use of pointers for improved code generation
*declarations are used for improved safety
The two languages have converged: modern C (and C++ even more) is Pascal-like in an effort to get something like Pascal-like efficiency, portability, and safety.
Of course not everyone uses C and C++: C# and Java show what happens when you converge to BASIC instead of Pascal.
Admin
Admin
http://svn.codehaus.org/groovy/modules/scriptom/trunk/scriptom-office-2k3/src/main/java/org/codehaus/groovy/scriptom/tlb/office/word/Word.java
Admin
Admin
Niklaus Wirth was once asked how to pronounce his name, and replied, "If you call me by name, it is Neeklaws Veert, but if you call me by value, it is Nickle's Worth".
Admin
Admin
Admin
Admin
"Break" (uppercase B) is not a keyword in C/C++. "break" (lowercase b) is. Since C and C++ are not shitty enough languages to be case-insensitive, importing Word typelibs into C/C++ would not give any issues.
As for the people saying "hurr durr you can use Delphi to create .NET applications" - you can also masturbate with a cheese grater, which is about as pointless, but a far less painful experience.
Admin
It is, however, compatible with Turbo- and Borland Pascal code. Which didn't used break as keyword.
Captcha: similis. This interface name is so similis to standard Pascal construct that it hurts.
Admin
Admin
i am not getting this wtf.
Admin
Admin