Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #39768] [TODO] Tcl - Switch to runtime errors?

4 views
Skip to first unread message

Matt Diephouse

unread,
Jul 8, 2006, 5:37:43 PM7/8/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Matt Diephouse
# Please include the string: [perl #39768]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39768 >


The official Tcl implementation doesn't throw any errors at compile
time because it doesn't have one (not even in the sense that Perl5
does). As a compiler, we are left with two options:

1) Throw compile time syntax errors anyway because they're
arguably the Right Thing To Do.

2) Fake it and output code that throws an error at runtime.

Option 2 is probably the correct one to take, but it can easily be
made later. So for now we'll just go with option 1 because it's
implemented.

Here's an example that shows the difference:

puts hi
puts [set a 4

That outputs "hi\n" with tclsh before dying with the syntax error.
Partcl just dies without outputting anything.

--
Matt Diephouse

0 new messages