News for hackers. Stuff that matters.
Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by to3m on Thursday December 20, 2012 @05:15PM (#4950411)
The explicit tail calls look pretty neat. All languages should include this, or something like it, I think; tail calls come in handy for all sorts of things. Making it explicit sidesteps complaints about how it will impede debugging, and ensures programmers will definitely get it where they want/expect.

I think this would be a chance to rehabilitate the much-maligned GOTO keyword. But "tailcall" is probably just as good.

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by btilly on Thursday December 20, 2012 @05:56PM (#4950560)
I think this would be a chance to rehabilitate the much-maligned GOTO keyword.

Perl has used "goto &foo" for that exact purpose for ages. It just became yet another random feature that experts know about, regular programmers ignore, and critics use to show how terrible the language is.

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by draegtun on Friday December 21, 2012 @04:27AM (#4952087)
And there are a few CPAN modules for those who are squeamish about using goto :)

- https://metacpan.org/module/Sub::Call::Tail

- https://metacpan.org/module/Sub::Call::Recur

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by michaelhoffman on Thursday December 20, 2012 @05:39PM (#4950496)
Python language creator Guido von Rossum prevents CPython from having tail call optimization because he doesn't want people to use it.

http://neopythonic.blogspot.com/2009/04/tail-recursion-elimi...

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by lolcraft on Thursday December 20, 2012 @09:36PM (#4951228)
Well, to be trollish :), he also didn't want it because:

1 - With TCO, there would be no more "recursiveFunction recursiveFunction recursiveFunction" x 1000 stack traces. Which apparently is bad. Might force someone to use a debugger, you know.

2 - Non-standard Python implementers won't be competent enough to code it, so it's best he doesn't force them to.

3 - He doesn't believe in recursion. He doesn't like it. I mean, the look of it. It's too nerdy.

4 - He made a bad choice in basing his language in dynamic binding. He recognises it, says it's horrible style, un-pythonic, but won't make it go away because users, users, yadda yadda. All this from someone whose job description is BDFL ;)

Yeah, I'm bitter about some minor quirk no one cares about, but... you know, I might have preferred a "I can't be arsed to do it" answer. Those arguments are pretty laughable.

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by yfyf on Thursday December 20, 2012 @07:27PM (#4950846)
I wonder if he would claim the same argument today as he does in this[1] comment, in particular the paragraph "On side effects being bad <..>".

I would dare to claim that there's some trend to do things more side-effectlessly not only in programming, but also in general, people in IT are finally realizing* that the more isolated, light-weight and modular things are (think of increased interest in functional programming (pure functions), dominance of cloud-based/inspired solutions (spinning up small instances of VMs)) the better. Somehow this particular mindset helps at all levels.

Hah, there's actually a term for what I'm trying to describe: Shared nothing architecture[2]. Allowing side-effects on any level implies "sharing" to me.

[*]: of course you could say "this has always been the case", but somehow some years ago Java and the friends seemed like the only "enterprise level" solution to most businesses and the general fat-stack+vertical-scaling seemed somewhat reasonable.

[1]: http://neopythonic.blogspot.nl/2009/04/tail-recursion-elimin... [2]: http://en.wikipedia.org/wiki/Shared_nothing_architecture

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by mahmud on Thursday December 20, 2012 @08:12PM (#4950991)
I don't think the world of software development changed at all since 2009. It takes about 15 years to see noticable shifts in practices.

Also, shared-nothing "architecture" goes back to the 60s with the first investigations into concurrency. In fact, if I were being pedantic, I would say it predates computing itself: logic is all side-effect free.

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by yfyf on Thursday December 20, 2012 @10:15PM (#4951325)
Sure, theoretical investigations on things begin many years earlier than anyone starts actually using them, but somehow "concurrency" wasn't something available to your everyday Joe back in 60s, right? Multi-core wasn't the norm, there was no elastic cloud, what so on.

And I am not really claiming that software development changed much in 3 years, but I think people's mindsets are changing faster than that, especially of those who are actively involved in thinking about these things.

Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by mahmud on Friday December 21, 2012 @06:19AM (#4952303)
Fair point.
Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by xnxn on Friday December 21, 2012 @01:35AM (#4951764)
I clicked that link ready to laugh, but he makes a persuasive argument. I feel like I've been tricked.
Re:Tcl/Tk 8.6 released (now stackless, w/coroutines, tailcal... by sigzero on Thursday December 20, 2012 @05:46PM (#4950527)
His choice, he is the BDFL after all.