News for hackers. Stuff that matters.
Re:Py2cr: A Python3 to Crystal Translator by cutler on Monday December 27, 2021 @11:59AM (#29704173)
"roughly equivalent"? They're chalk and cheese to me. Python metaprogramming, anyone? Each? Blocks? Real lambdas? Don't get me started. I'm not saying you can't do it, just why would you want to when you end-up with something that doesn't resemble what you started with?
Re:Py2cr: A Python3 to Crystal Translator by viraptor on Monday December 27, 2021 @04:34PM (#29707037)
Roughly equivalent as in they have very similar object model and each construct is trivial to convert into the other. each is just a fancy for with new scope, blocks can be replaced with local functions, etc. They don't have anything that's not a trivial transform away (like for example: tail calls, callcc, macros, compile time transformations, ...).

I mean, you may prefer one of these:

    foo.each { |i| ... }
    for i in foo: ...
but after fixing up the scope issues, they're the same thing.