5 ms·
I think that ruby, perl, python and javascript are similar only in purely theoretical way. Python - is "executable pseudoscript". It does not have ruby eleganc
by Ingaz 14y ago
I think that ruby, perl, python and javascript are similar only in purely theoretical way.
Python - is "executable pseudoscript". It does not have ruby elegance, perl "worse is better", javascript ... minimalism(?)
I'm using python for prototyping. As communication tool.
I can describe all python scetches to every programmer, be it javer, c-sharper, C-developer or SQL-er.
Can I use perl/ruby/CSharp/Java/F#/Haskel?
Answer is NO.
Perl: sigils, regexp everywhere (when it not needed), parameters passing, "use strict", strange OOP - all those features makes it impossible for prototyping.
Ruby: it's the same as for perl. It looks more pleasant to eyes but it is no way "pseudocode" that everybody can read.
C#/Java - prototyping is a joke. And I can't use sharp-code for javer and otherway.
F# - F# is looking a lot like "pseudo-script". But the main strength - type system is not helping in prototyping.
LISPs - I think that LISPs are good for prototyping. The only problem - they are LISPs.
- philwelch 14y ago> Perl: sigils, regexp everywhere (when it not needed), parameters passing, "use strict", strange OOP - all those features makes it impossible for prototyping. > Ruby: it's the same as for perl Nothing you said about Perl can be applied to Ruby.
- Ingaz 14y ago"The same" means "ruby as pseudocode is the same as perl". You need to explain that 0 is True. You need to explain blocks, (int_number).times and other cute things. And I heard a lot of complains for whitespace, but begin-end is more irritable for many.
- technomancy 14y ago> You need to explain that 0 is True. Easy: it's not C. The idea that zero is false only makes sense if you're trying to code very close to the metal. To everyone else it's baffling.
- philwelch 14y ago> "The same" means "ruby as pseudocode is the same as perl". Right, except none of the reasons you gave for why perl is a poor pseudocode apply to Ruby, so you need to make that point yourself. > You need to explain that 0 is True. The truth values of integers don't usually come up in pseudocode. > You need to explain blocks, (int_number).times and other cute things I agree that the concept of passing around a block of code is hard to implement in less expressive languages, though cases like "each" and "map" can be simply translated to for loops. You could make the same criticism about Python's lambdas or list comprehensions. n.times is perfectly useful pseudocode, though. Think of it as a shorthand for "for(i = 0, i < n; i++)".