Using scripting languages for KDE4 main modules

Stephen Leaf smileaf at smileaf.org
Tue Oct 3 17:12:18 BST 2006


On Tuesday 03 October 2006 11:00 am, Guillaume Laurent wrote:
> Stephen Leaf wrote:
> > On Tuesday 03 October 2006 9:58 am, Guillaume Laurent wrote:
> >> You should give Python and Ruby a spin. Python's syntax may be
> >> off-putting (I thought the same initially) but when you actually try to
> >> write something with it, it really doesn't get in the way. And even
> >> though I much prefer Ruby (both syntax and features), Python's single
> >> coding style is an advantage.
> >
> > I hardly see a single coding style as an advantage.. Unless of course
> > that 1 coding style is your preferred coding style.
>
> Not when dealing with shared codebases.
I can agree, if your sharing your code base and your not the one setting the 
coding style. I'd rather set the style, not the language. Personal 
preference.

>
> > I can see numerous problems with the indentation block idea python uses.
>
> Yes, so can plenty of people, yet somehow all these Python programmers
> seem to cope just fine, and have been doing so for quite some time. So
> perhaps these numerous problems aren't that big after all.
I'd rather not "cope" with problems if I don't have to.
>
> > As for ruby, all of the examples I looked at made my head spin. I found I
> > almost had to read every line backwards in order to figure out what it
> > was trying to do. Those "simple" examples just made my head spin with the
> > "Why?" and "could they have possibly made this any more complex?"
> > half of them I couldn't even figure what they were doing even with the
> > description of what it did.
>
> The only "strange" part of Ruby's syntax is the handling of closures :
> obj.dosomething { |arg| fumble(arg) } .
Yes I just found that in the tutorial I'm in...
[1, 3, 5, 7, 9].find {|v| v*v > 30 }   ยป  7
Can anyone explain to me How that is natural to read??
"It has an elegant syntax that is natural to read and easy to write." -- 
http://www.ruby-lang.org/en/

> It's actually pretty simple and 
> once you understand how to use it (takes about a minute following a good
> tutorial), you really get hooked :-). (and both Python's and Perl's
> equivalent are way uglier).
I might agree more if I ever did a closure in perl. (might be I'm not sure 
what you mean by a closure?)




More information about the kde-core-devel mailing list