[Non-coders: it shouldn't matter if you don't know about the
specific technical issue that I'm discussing here. Hopefully, I've managed to convey something of what it feels like to code in different languages, which is the important thing
(
Read more... )
Comments 16
Reply
What are your main languages? Java and Python?
Reply
Reply
Reply
However, in swedish, latin and german, I would most probably be capable of using the optative correctly. AND I always tuck my shirt. :P
Reply
Reply
(The comment has been removed)
Reply
Reply
pozorvlak@delirium:~>perl -le '$x = 3; print $x . $x; print $x + $x'
33
6
:-)
[You'll note that Haskell doesn't use "+" for string concatenation either.]
Secondly, the dynamic philosophy is that errors caused by this kind of thing are a) mostly trivial, b) easily detected by testing running code, which you need to do anyway to find the real bugs. I've found that this accords pretty well with my experience, tbh. But hey, I've never tried to write climate-modelling systems or real-time control software for nuclear missiles, so maybe that's just a reflection of the limited scope and relatively small scale of the code I write. But, you know, there are a hell of a lot of things you can do in ten lines of Perl, so features that only make sense for small programs should not be dismissed. And other ( ... )
Reply
Reply
So, you're a Ruby hacker? Interesting. I have no idea who you are, you see, so can't infer much about your choice of languages - but I've heard your comments about string concatenation versus addition a dozen times and don't find them in the least convincing, for reasons I've hopefully explained :-)
My problems with Haskell's type system are that 1) it causes me lots of grief and frustration (and will do until I rewire my brain to do stuff that a Perl interpreter would do for me >:( ), 2) I find it's often insufficiently expressive for my needs (and many of its more recondite aspects seem rather ad-hoc). As in, I can't do things in Haskell (or can't do them without going to ridiculous lengths) that are straightforward and standard practice in C++ or Ada. ( ... )
Reply
Reply
As far as I can remember, I've only had a tiny number of problems caused by type coercion in Perl. Mostly it just does the Right Thing. A lot of this, of course, is sensible choices of operators: for instance, string concatenation in Perl is always ".", so "3" + 3 has the unambiguous meaning of 'coerce the "3" to 3, then add' - see my response to Anonymous, above. Note that this is not simple or consistent1 - this requires hundreds of delicate balancing acts all over the language to get the magic right. See here for an excellent blog post on this kind of thing.
The way I see it, computers should know their place, and that place is to obey my commands. If they don't know what I mean, they can ask for clarification, and that's fine, but I don't want them to start guessing.And again, I used to think like that. But it turns out that it is possible to guess with a (perhaps surprisingly) high degree of reliability, and besides, do you trust any code that you haven't tested properly? Having experienced this, I know ( ... )
Reply
Leave a comment