2 ms·
I like Java, Javascript, Go (which holds a special place in my heart), and C++ even. And I'm being a bit hyperbolic -- I don't hate Python, but sometimes I feel
by dvt 10y ago
I like Java, Javascript, Go (which holds a special place in my heart), and C++ even. And I'm being a bit hyperbolic -- I don't hate Python, but sometimes I feel that the language works against you, and not with you.
- secstate 10y agoNevermind that Javascript has a hideous side too: http://callbackhell.com/ http://callbackhell.com/ And don't get me started with Java's verbosity. Half the time Java seems completely unusable without an auto-completing IDE. And in all honesty I am a big Python fan, but only because it seems like the lesser of all evils in programming. There are some great designs out there, but Python is that toolkit that just seems to be pragmatic enough to be useful and idealistic enough (hello, significant whitespace) to encourage expressive algorithm design.
- djsumdog 10y agoI started taking Scala jobs a while back and I don't think I'd every want to go back to a Java shop. That being said, some things in Scala are difficult to wrap your head around, and anything made by TypeSafe/Lightbend should die in a fire, but overall I still enjoy coding in it.
- deathanatos 10y agoYou like JavaScript, the language where parenthesizing an expression can change the value of that expression[1]: > {} + [] <- 0 > ({} + []) <- "[object Object]" or how the identity x|0 == x doesn't hold for all "integers"[2]: > 4294967296 | 0 <- 0 or how function definitions aren't grammatically statements, making this[3]: function foo() { function bar() {} // legal if(1) { function baz() {} // illegal! } } this just always bites me: > "a string" instanceof String <- false (but seriously, I don't understand why JavaScript needed the object/primitive distinction. I get it for Java, but not in JS.) > sometimes I feel that the language works against you, and not with you. JavaScript is the language where you ask it, "here, I want to know which of these guns most adequately shoots my foot." ES6 improves things considerably; in 10 years we'll have good browser support for basic data structures, like Map and Set. [1]: I'm joking. Read it first, then return to this footnote. The sleight of hand is this: the first expression parses as an empty code block, followed by a unary plus taking an empty list. The second parses as binary addition. There's also a terrible amount of coercion taking place. This also "means" that binary addition "isn't" commutative: {}+[] and []+{} evaluate to different values; the same trickery is involved. [2]: the binary or operator, |, silently converts the operands to a signed 32bit integer for the duration of the expression. Note that signed 32bit integer is a type not available to the JavaScript programmer — it only arises internally! (The only numerical type available is "Number", which is an IEEE double.) [3]: the grammar for functions is essentially "list of statements or function definitions", so function definitions are only valid at the "top level" of a function.
- dvt 10y agoTrue, JS is a pain in the butt. But I think it's fun: it feels fluid and that you can do almost "anything" with it (for better or worse). In Python, I feel that I'm fighting against arbitrary goalposts or that I'm wracking my brain parsing some logical puzzle (like in the PEP example).
- secstate 10y agoProperly spec'd and implemented language structures are the opposite of logical puzzles. JS is not fluid, it's broken.