|
|
|
|
|
by ashleyw
5710 days ago
|
|
Flask looks similar to Ruby's Sinatra: http://www.sinatrarb.com/ @OP: Personally I think Python has a lot of syntax fluff, whereas Ruby couldn't get simpler in that regard; even forgetting about the LOC and focusing on the respective DSLs: Python: from flask import Flask
app = Flask(__name__)
@app.route("/hi")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
Ruby: require 'sinatra'
get '/hi' do
"Hello World!"
end
Don't get me wrong, I sometimes use Python, it's a great language, especially for non-web things, but I always jump at the chance to use Ruby. It's not the fastest language (though compared to Python nowadays, it doesn't lag behind that bad), but it's the nicest by far I've ever had the chance to work with. |
|