News for hackers. Stuff that matters.
Re:Hello Ruby – Almost there by MichaelMoser123 on Monday August 03, 2015 @08:03AM (#9995124)
What i don't like about Ruby is that undefined variables can be accessed without error (just like javascript); Python is better in this regard;

However pythons indentation think is not so great for teaching intro to programming.

i have my own small project - the pooh language; it probably has other features which might annoy some people (downside is that it does not have all these libraries that the grown up languages have ...)

http://mosermichael.github.io/cstuff/all/pooh-lan/2012/12/11...

Re:Hello Ruby – Almost there by pluma on Monday August 03, 2015 @08:16AM (#9995182)
I find that Python's indentation is actually useful for beginners. It forces them to format their code and as long as they use an editor which shows invisible characters and can be configured to convert tabs to spaces, they tend to get used to it very quickly.

I say that as someone who has repeatedly had to help JS beginners with what I like to call accidental indentation (basically the result of copy-paste and accidental programming -- throwing code at the compiler until it works). Consistent indentation can go a long way for making code parseable by humans.

Re:Hello Ruby – Almost there by nateberkopec on Monday August 03, 2015 @08:37AM (#9995272)
> What i don't like about Ruby is that undefined variables can be accessed without error (just like javascript)

What do you mean by this? Can you give an example?

Re:Hello Ruby – Almost there by cremno on Monday August 03, 2015 @09:19AM (#9995523)
Accessing undefined/unitialized global or instance variables (like: @i) is not an error and nil will be returned. With -w a warning will be emitted. The weird class variables must be initialized. Local variables (lexically scoped) must be defined and are default-initialized to nil. (Global and class variables are usually not used.)
Re:Hello Ruby – Almost there by yedpodtrzitko on Monday August 03, 2015 @12:48PM (#9997609)
another example: > a=a => nil

but then:

> a=b NameError: undefined local variable or method `b' for main:Object