Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> A real dev can pick up a new language and syntax in a week

No, that's complete bull. A real dev can pick up syntax in a week (or a day), but integrating concepts and techniques he's never seen so far and building up new instincts which correctly fit the new language, that does not happen in a week unless the guy is in the "genius" category.

What you really have after a week is a guy who writes $previous_language code in a new syntax. In the way "Real Programmers" can write Fortran in any language.



I totally agree - there's also the point about a language's eco-system. For example, Perl has CPAN and CPAN brings with it conventions, issues and quirks that take a good few months to (gradually) learn.


It's totally true that it takes time for your idioms to catch up with the capability of the syntax. Maybe the big (and common) mistake the parent is talking about, though, is assuming that because a given programmer knows Blub but doesn't know Blam (generic language with some semantics either not supported, under-supported, or not often used in Blub), they will find the concepts in Blam strange and difficult to adapt to. They may already be familiar with a similar concept or even writing something like Blam-flavored Blub.

I'm a latecomer to the Ruby game, and have done a lot of PHP and JavaScript over the last 10 years (though those are far from the only languages I know and have worked in). It's been funny to see what kind of assumptions that means other devs make about what Ruby concepts are going to be big steps for me. I was told by some people that blocks would be a revelation and that metaclass manipulation would melt my brain. But blocks map pretty directly to the familiar concept of passing around functions, and metaclass hacking onto things present in Perl and JavaScript that I'd sometimes wished I'd had in PHP.

Similarly, Haskell and Erlang -- while significantly different from the languages I've used most of my professional life -- both feel pretty familiar after a long-ago stay in the land of Prolog.

I understand the impulse to assume you know something about a developer from the languages they claim proficiency in -- and the impulse to assume that devs who don't know the languages your revelations have come in haven't had those revelations. Generally, for example, I don't think particularly well of a lot of my fellow PHP devs. But when it comes time to make serious judgments like hiring, rather than asking them which languages they know, I want to look at whether they understand certain semantics at a language-independent level, I want to know what they like about the languages they know, what they'd add to the language if they could, and what they'd take away.


blocks may map onto function passing in JavaScript at a high level, but they also do some things that are different in important ways.

Most notably, all code in Ruby blocks, including return, super, and yield, execute as if in the original context. This means that you can return from inside a block, and it will return from the original method the block was created in.

This is especially useful for custom iterators. In contrast, code inside a "built-in iterator" (for and while loops) in JavaScript is executed in the original scope, while code in a custom iterator (forEach, map, etc) is executed in a new scope.

This makes custom iterators in JavaScript clumsier to use than the same in Ruby. ES6 adds a way to implement custom iteration in JavaScript that hooks into the for construct, but the benefit of this feature is not limited to iterators.

Further, the new JavaScript iterators cannot be used to implement functionality like map and reduce (take a look at Ruby's Enumerable module for other examples), they essentially hardcode a forEach construct into the language, which is useful, but is not the same.

Edit: Just to be clear, the point of this comment is to illustrate that even in a case like functions/blocks, the mapping that people do can stick them in the idiomatic mindset of another language. Ruby's compliance with Tennet's correspondence principle (x ~ lambda x) creates many new opportunities for block use that may be missed by people familiar with function passing in a non-correspondence language like JavaScript.


"blocks may map onto function passing in JavaScript at a high level, but they also do some things that are different in important ways."

Didn't mean to imply they're in every way analogous anymore than I meant to imply that Haskell and Prolog are virtually identical. :)

Mostly I was looking for an example of a concept where other programmers seemed to think it was likely I'd've had limited exposure to and perhaps even trouble wrapping my head around (passing code) until I'd done it the same language where they'd come to understand/use it (Ruby).

"the point of this comment is to illustrate that even in a case like functions/blocks, the mapping that people do can stick them in the idiomatic mindset of another language."

If the keyword there is can, I don't disagree, both in the specific and general case. I know that even subtle differences between semantics can be important to both expressiveness and idiomatic constructs, I think it's credible that habit often results in trying to carry idioms over, and that a programmer who is only taught the syntax of Blam could be writing Blub in it for a while.

What I don't agree with some developers on is that this is a matter of constraint instead of trajectory -- that the languages a programmer already knows necessarily indicate the difficulty they'll have with adapting to differences and wielding them effectively.

To work with your example, it may be a decent guess that it might never occur to someone who hasn't worked in a purely TCP language to return or yield from inside a passed block, but I have my doubts that it'd be any kind of reliable predictor of how quickly they could wield the concept after explaining that it's kosher and showing an example where it's advantageous.


It does depend which other languages they've previously been exposed to. I'd argue that once you've seen Haskell, common lisp, APL and Forth, there aren't many new concepts that any language is going to throw at you that you can't relate back to something you've seen before. It doesn't take a genius to get that much exposure, just curiosity, patience and time.


So far in my limited experience the rule still holds: If you drop a Haskell programmer into Blub they may well try to write Haskell-flavored Blub for a while. I've seen it happen.

I think you're misapprehending the problem. It's not that Haskell programmers can't understand the structure of Blub. Gods, no. It's that it takes time and tolerance to be able to immerse oneself in the Blub culture. Blub has its way of doing things, much of which is more accidental than logical, and alas, much of what passes for colloquial Blub is probably stuff that Haskell was specifically designed to avoid like the plague. There's an initial tendency to either run around waving one's arms like Jeremiah, trying to convert the Blub programmers to the side of Light, or to take to drink in despair at the sheer Rabelaisian sloppiness of the Blub universe. To work through this takes time, and possibly therapy.

It's like anthropology. It's one thing to be a linguist and work your way through library books about the syntactic structure of a family of languages from New Guinea, but it's another thing to be airdropped into New Guinea itself, insinuate yourself into a local village, pray you don't die of any tropical diseases, learn which compliments in your native language are actually mortal insults in your new host culture, try to laugh along with the natives when they convince you to lean against a tree filled with stinging ants, and simulate exquisite happiness when your host offers up a delicious sample of the local insects. It's a cultural problem. Not everyone is up for that experience. One may have to work through a certain amount of shock.


I agree it's largely culture, but I think there are some technical issues that go with the culture as well (which are sometimes the reason for some cultural elements). Even someone who solidly understands OOP, for example, may not know all the many specific gotchas and possible pain points of C++ if they haven't written a lot of it, and some of the cultural conventions common in C++-land were developed because of awareness of those gotchas, and in an attempt to minimize them. C++ is probably a limit case because it's so large and has so many interacting features that there's a lot of accidental complexity, so just knowing the PLs concepts only takes you so far, but I think many languages have some similar things.

Heck, even ye olde C has a whole litany of detailed spec edge cases you need to know about if you want to understand the finer points and avoid some nasty pitfalls (and an even bigger list if you go to C+POSIX).


Oh, I agree, and we're actually talking about the same thing. We're just defining the word culture with different scopes. My scope was, approximately, "anything about C++ that you really need to know to write idiomatic C++ code and interact productively with your C++ coworkers and community, but which you didn't learn from that Introduction to C++ for Lisp Nerds book that you skimmed last weekend."

Clearly not a hard-and-fast definition. The more "proper" scope of the word culture is, of course, ultimately a giant philosophical issue which I intend to blithely handwave away. ;)

(I suppose one could try to argue that all of C++ is a cultural artifact, and C and assembly for that matter, but sooner or later you'll reach the Turing machine, which if you chip away at it you'll soon discover is just the tip of an iceberg which consists of all of mathematics, and then folks like Plato will turn up on the battlefield looking for a fight and holy cow, look at the time, gotta run.)


I'd say the APL experience alone also requires a significant bit of masochism. And while you'll be able to relate to things you've seen before, concepts alone are not sufficient to be proficient in the language, as I noted:

> concepts and techniques he's never seen so far and building up new instincts

"techniques" and "instincts" have to do with the language's idioms, tools and ecosystems. The tools (libraries) and part of the ecosystem may be similar to ones you knew, but you'll still need to learn the new ones. The idioms may very well be brand new.

To use a real-world example, while they're fundamentally based on the same concepts (class-based OO, dynamic single dispatch) Python is not Java [http://dirtsimple.org/2004/12/python-is-not-java.html]. And acquiring Python "instincts" after a significant time of Java is not easy. It's not hard either, but it's not the "5 days to complete proficiency" necro asserts. And those are ultimately very similar languages.


There's definitely some truth to this and I've seen it myself. Nonetheless, there is a point where these languages begin to have more similarities then differences. By the time I felt comfortable with C, Java, PHP and Ruby it only took me a couple of weeks to feel like I had a decent handle on Python.

That said, I'm sure there are a lot of Python specific techniques that still elude me and I continue to read through the source for libraries I'm using.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: