Case in point: Win32::DirSize (which I'm picking on because a new release just came out). Here's a brief synopsis:
my $Directory = "C:\\TEMP";
my $DirInfo;
my $Result = dir_size(
$Directory,
$DirInfo,
);
if ($Result == DS_RESULT_OK) {
my $Unit;
...
This bit from the synopsis shows two examples of what I mean. First, it uses predeclared variables that act like buffers ($DirInfo in the above example), which is very C-like and not very Perl-like. I don't mind it in C but it annoys me in Perl. Second, it exports Win32 error code constants from the API and forces ME to check the return value - ugh. Failure ought to be handled internally with $! set to the appropriate error message.
To be sure, Win32::DirSize is not the only guilty party. In fact, it seems that most of libwin32 is like this.
Why are people coding this way?
Not sure of my Latin... (Score:3, Funny)
Brainrottus Redmondus?
Reply to This
Different culture (Score:1)
Those that work on win32 must bend their minds to the environment. Win32 wasn't designed for programmers like unix was. Win32 is about pain. Win32 is about making Suits happy. Win32 is about keeping the riff-raff from writing their own applications instead of buying them. It's about making sure the lowest common demoninator macro writer doesn't hose the system (this goal hasn't been met with all that much success).
Recently, I've had some new adventures in OLE programming and already my eyes have nearl
Re:Different culture (Score:2)
Re:Different culture (Score:2)