App Engine kind of rocks if you use the Python version. The JVM version, which is what you're stuck with if you want to use Ruby, isn't even good enough to suck. It isn't even "beta" or "testing". It's a complete joke. It takes 13-20 seconds to warm up, and it cools down after a few minutes of not being used. That renders it completely useless
(
Read more... )
Comments 10
There's a pretty good argument to make that requiring explicit 'self' in the parameter list reinforces the theoretical equivalency between these two ways of calling a method, given that 'foo' is an instance of 'C':
foo.meth(arg) == C.meth(foo, arg)
It's neat to know that that's how it works, but unless I'm missing something, his argument has nothing to it. Under the hood, methods are invoked with Class.method(object, argument), but we're allowed a little syntactic sugar, so that we can normally invoke them with object.method(argument). If he's willing to do that, the question remains: why isn't he willing to let
Class C
def method(argument): passjust be syntactic sugar for what under the hood is interpreted as a method that takes two arguments, the first of which normally gets passed automatically, but which you can ( ... )
Reply
class A:
def __init__(self, var):
self.Avar = var
def foo():
print self.Avar
class B(A): # that's how you say it sub-classes A
def __init__(self, var):
A.__init__(self, var + 1)
self.Bvar = var
def bar():
print self.Bvar
obj = B(5)
obj.foo()
obj.bar()
results in:
6
5
After that, the next thing that's going to piss you off is that the function to assemble a string from a list is a function in the string class, not the list.
l = ["foo", "bar", "foobar"]
print "\n".join(l)
results in:
foo
bar
foobar
Reply
Reply
Reply
join being part of String rather than Array does seem backwards coming from Ruby, but I can see the sense in it.
I expect going in that most of the little things will work differently than I'm used to. Having to explicitly write all member functions to receive the calling object as the first parameter isn't something that I expect in a high-level language that's heard of object-orientation, though.
Reply
(The comment has been removed)
I was considering Duby (Ruby syntax that compiles to Java bytecode; I'd miss the dynamic/magic nature of Ruby, but at least I'd have my syntax), but when I realized I'd still be waiting at least 5 seconds for it to fire up, I realized Python is the only option.
Reply
A) You do seem stressed out lately. Getting confused and frustrated over design choices of "free" web services in order to save yourself a few dollars a week isn't like you. Take care of yourself.
B) explicit self is a symptom of one of my favorite things about Python, which is identifiers are always explicitly defined in the file where they are used. For any identifier, I can always use the text editor's plain "find string in file" function and find it in an import statement, an assignment statement, class or def statement, or the function signature. I could understand if self were an exception to this, but I don't mind that it's not.
Having all function arguments be explicit also lets you do this, although I'll leave it to you to debate the merits of that.
3) I'm not sure I understood you correctly, but if you really are just hosting static content (perhaps generating it with something like Jekyll), price it out with NearlyFreeSpeech. Be sure to check the "only static content" option and set mysql processes to 0. I host ( ... )
Reply
Reply
Leave a comment