Re: D gets it right
From: Mark 'Kamikaze' Hughes (kamikaze_at_kuoi.asui.uidaho.edu)
Date: 02/13/04
- Next message: Mike Wahler: "Re: Ifstream problem"
- Previous message: Richard Heathfield: "Re: The Philosophy of Programming?"
- In reply to: Joe \: "Re: D gets it right"
- Next in thread: Joe \: "Re: D gets it right"
- Reply: Joe \: "Re: D gets it right"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 13 Feb 2004 00:40:02 GMT
Joe \"Nuke Me Xemu\" Foster <joe@bftsi0.UUCP>
wrote on Thu, 12 Feb 2004 13:34:30 -0800:
> The current 'best practice' seems to be to throw an exception in
> the finalizer in order to crash the program with an unfriendly
> diagnostic message. Of course, since Java is no longer guaranteed
> to even call pending finalizers on normal program exit, this is
> even farther from a 'panacea' than it first appears.
Finalizers never worked reliably in Java, and anyone who relied on
them was writing bad code in defiance of the documentation and all
accepted practice. It would be nice if they had been functional, at
least at program close, but that's not the case. But what is it that
you'd prefer a language to do when an exception occurs in a finalizer?
Trap and display it, and continue on to the next 10000 identical objects
which will also fail? That sounds like a cunning and very
developer-friendly solution. Please demonstrate this technique in your
language so we can all observe how useful it is.
> And the Java
> bigots wonder why Visual Basic was one of the most popular languages
> before Micro$haft killed it in favor of their buggered Java clones!
I'm fairly described as a Java bigot[0], and I don't wonder that about
VB at all. VB was a brain-damaged[1] language designed to allow
non-programmers to attach 10k of broken code to a GUI button, or to
create the exciting new field of email viruses. It filled the niche
that Hypercard did on the Mac, but with Microsoft's usual standard of
ease of use and quality instead of Apple's. Its popularity among
Windoze users is completely unsurprising.
[0] Really, more of a "good languages bigot". I'm perfectly happy with
Python, PHP, OCaml, and several other languages. With time and some
practical examples of its use, D may well join that list.
[1] "It is practically impossible to teach good programming to students
that have had a prior exposure to BASIC: as potential programmers they
are mentally mutilated beyond hope of regeneration."
-Prof. Dr. Edsger W. Dijkstra
I don't fully agree with the good professor. I do believe it's possible
to recover from bad programming languages. I certainly hope so, since I
was raised on BASIC, before learning better.
-- Mark Hughes "God, I think. God. He doesn't answer, and I'd be justifiably scared--but not in a panic!--if he did, since I would know it really was Resuna, or a tiny brain tumor, or some boo-boo in my mix of neurotransmitters." -John Barnes
- Next message: Mike Wahler: "Re: Ifstream problem"
- Previous message: Richard Heathfield: "Re: The Philosophy of Programming?"
- In reply to: Joe \: "Re: D gets it right"
- Next in thread: Joe \: "Re: D gets it right"
- Reply: Joe \: "Re: D gets it right"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|