Scheme needs traits/properties

I just came across this post about the lack of good error reporting in the PLT scheme webserver:

I’m a fan of the PLT Scheme web-server. (I better be or else find another job!) But I get an error message like:
Servlet exception: "car: expects argument of type ; given #"

And when you have 2000 lines of code across four files, not to mention that it might not have been you who called car directly, you start to think, “will I ever find this bug?”

Could I get a line number, or any additional information from the web-server? No. And the bug I filed was closed without resolution in a record 4 minutes.

Now I don't actually know the real reason why the PLT folks don't want to give a line number with their error messages, but I'm going shoot my mouth off and assume it has something to do with the fact that the exception object they're throwing simply doesn't have that information currently, and has nowhere to put it without changing the object type and thereby breaking existing code. In fact I suspect they're throwing a simple string, and not a structured data type.


Perl 6's properties would solve this problem handily. You would continue to throw a string, but you'd also tag it with a file and line number. Existing code could treat the object just like a plain old string, but new code could look for the extended information.

I notice that the Scheme community may be putting together an R6RS soon. I looked at the draft charter, and it seemed astonishingly conservative. For example, they're completely ignoring ad-hoc polymorphism (whether you implement it as multimethods, type-classes or interfaces). It's so annoying to distinguish map, which only works for lists, from map-vector and map-string.

At least they're planning on supporting unforgeable user data types. That one's only overdue by, oh, I'd say about 20 years...

I'll grant that Scheme's raison d'etre is more as a framework for describing computation, rather than as a language that's useful for actual programming. But that leaves no incentive for people use it to actually write programs, unless they're interested in playing around with language features (like I am).

Posted on November 14, 2003 01:20 PM
More languages articles

Comments

Good News For you,Ugg Boots Sale on www.addboots.com, you can find cheap ugg boots in ugg store,there are ugg classic short boots , ugg classic tall boots,ugg classic cardy boots, ugg classic mini boots , ugg ultra short boots , ugg ultra tall boots , ugg baby boots and you can find the most popular boots,it is the newest style this year, ugg bailey button boots , you can enjoy free shipping if you buy now! don't wait to the winter as the price is cheaper than that at that time!!! come on!!

Posted by: cheap ugg at October 30, 2009 08:25 AM

Uggs on sale now.UGG Classic Cardy Boot makes me different form the other

girls. The UGG Bailey Button Boot is a good choice for female.

Posted by: ugg classic cardy boots at November 17, 2009 12:40 AM

The 39.html">classic cardy uggs boots is another hot boots that worth of buying.And the classic tall ugg boots
will make your winter amusing.And now uggs on sale,if you are looking for such a boot,the ugg boots is good choice this year.

Posted by: UGG Bailey Button Boots at November 17, 2009 01:04 AM

Louis Vuitton , commonly referred to as Louis Vuitton Sunglasses and Louis Vuitton Luggage Replica, or sometimes shortened to Gucci Belt has become one of the most Louis Vuitton Belt Agendas luxurybrands Louis Bags.

Posted by: 1 at November 17, 2009 01:47 AM

We are the best online sales for the china wholesale . Here you can have a large of choices of kinds Ugg Boots,Converse Shoes,Timberland Boots,puma shoes,Nike Shox Shoes ,Nike Dunk SB Shoes,Nike Air Max,Links Of London,Tiffany Jewelry,Dior Handbags?,jimmy choo handbags ,Cartier Watches, 8GB Mp4 Players,Bluetooth Car DVDs. All our cheap online cheap goods are high quality and original packages, and best service. We offer our customers the best service, 7 days arrive at your door.Enjoy your easy and happy shopping with us.

Posted by: cheap goods sale. at November 20, 2009 01:30 AM

Burberry replica
Bvlgari replica

Posted by: replica Rolex Sea-Dweller at November 21, 2009 03:28 AM

Laptop Battery Laptop Battery Laptop Batteries
Laptop Batteries discount laptop battery
discount laptop battery
notebook battery notebook battery
computer battery computer battery
replacement laptop battery replacement laptop battery
notebook batteries notebook batteries

Posted by: Laptop Battery at November 25, 2009 12:19 AM

People all over the world know the abercrombie and fitch,but not everyone really knows how fashion the abercrombie is,hollister is the Legend maker. Everybody wears the hollister clothing would be the abercrombie mens and the abercrombie womens, if you want know you can search the Ruehl No.925 or abercrombie outlet in the www.google.com .

Posted by: fitch at November 25, 2009 10:31 PM

Ugg Classic Cardy

Boots

Ugg Classic Tall

Boots

Ugg Classic Short

Boots

Posted by: topuggshoes at November 26, 2009 03:07 AM

Ugg Classic Cardy

Boots

Ugg Classic Tall

Boots

Ugg Classic Short

Boots

Posted by: topuggshoes at November 26, 2009 03:11 AM

Uggs have been identified as a fashion trend for both sexes since the early 2000s.Ugg boots ugg classic cardy boots ride the vagaries of fashion trends,ugg classic tall boots with a growth in popularity for men tied to increased celebrity usage (e.g., Leonardo DiCaprio. Men and women especially of college age, teens, and tweens wear Uggs with jeans, dresses, shorts and long shirts or sweaters with leggings,classic cardy boots ugg footless tights, or knee socks and sometimes without any legwear.

Posted by: ugg classic tall boots at November 26, 2009 06:54 AM

Uggs have been identified as a fashion trend for both sexes since the early 2000s.Ugg boots ugg classic cardy boots ride the vagaries of fashion trends,ugg classic tall boots with a growth in popularity for men tied to increased celebrity usage (e.g., Leonardo DiCaprio. Men and women especially of college age, teens, and tweens wear Uggs with jeans, dresses, shorts and long shirts or sweaters with leggings,classic cardy boots ugg footless tights, or knee socks and sometimes without any legwear.

Posted by: ugg classic tall boots at November 26, 2009 06:56 AM

chaoying nfl jerseys
Giants Jerseys
Patriots Jerseys
Packers Jerseys
These things are good, I hope you can continue to maintain!

Posted by: jerseysleague at November 29, 2009 03:31 AM

Just wanted to say great job with the blog, today is my first visit here and I’ve enjoyed reading your posts so far
ugg bailey button
Wow, my ugg classic mini will not be coming off now! I’ve had them on for 12hrs strait and I do not want to take them off. Thanks for everything, well worth the wait.

Posted by: ugg bailey button boots at November 30, 2009 05:59 AM

ugg boots sale at a time when large heat has set off a winter 08/09 to Ewha.Outlines the

warm wool winter fashion degree to wool crocheted wool ugg boots uk to join after the

body does not stimulate your skin soft, soft comfort UP. Fashion can not without
ugg boots presence in Winter.and ugg boots have many series.such as:
ugg classic
UGG Bailey Button boots
ugg nightfall
ugg kids

Posted by: uggboots at December 2, 2009 09:07 PM
Post a comment









Remember info?




Prove you're human. Type "human":