Live data from Hacker News

Polyglot programming and the benefits of mastering several languages

stxnext.com

51–60 of 68 posts

Re: Polyglot programming and the benefits of mastering several languages

#51
post #26

As I master my 15th or so language, I can't help noticing how often I have to search online for the simplest of tasks whenever I switch languages now because it's all turned into a big jumble. Does it need parentheses or not? How are closure variables managed? Do I need to release things? Do lambdas require scoping braces or not? What's the damn syntax for them again??? Do I need to use case(X), switch(X), when(X), s…

I think that's just the nature of the ... problem domain. There are too many little details that are too similar and our brains have gotten used to Googling. Early on I started creating text files for all these little details for all the languages I know. And now a quick search for these details is an extension of how my brain works. In other words I realized I needed to deposit these chunks of information where I kn…

Nice. I should assemble some shell scripts or python to do this now.

Re: Polyglot programming and the benefits of mastering several languages

#52
post #40
post #18

Earlier quoted context omitted.

I agree with the spirit of your point, but I'd be hesitant to say you're "mastering" your 15th language if they are all jumbled together. It sounds like you've learned 15 languages, but mastery implies an extreme depth of understanding beyond the point of confusing minor details. I would bet you have at least one or two languages that you work in often that you never get this stuff confused for, and those are the one…

Some people here learned, mastered and thoroughly forgot more languages and technologies than other people have started with yet.

> thoroughly forgot

I am stealing this phrase

Re: Polyglot programming and the benefits of mastering several languages

#53
post #32

As I master my 15th or so language, I can't help noticing how often I have to search online for the simplest of tasks whenever I switch languages now because it's all turned into a big jumble. Does it need parentheses or not? How are closure variables managed? Do I need to release things? Do lambdas require scoping braces or not? What's the damn syntax for them again??? Do I need to use case(X), switch(X), when(X), s…

I don't agree that you look like you don't know a damn thing. You know quite a lot. In fact, I would happily hire any programmer for, say, a python or a C++ job, that knows nothing about the language in use but knows to ask precisely these questions. Bonus points for questions about function semantics and memory management. Everything else boils down to syntax and ecosystem/tooling. The former is essentially irreleva…

It's nice, when doing actual work on a language you have zero experience with, to have a clear intuition about what to expect and what to search for and to feel confident that you'll be able to get things done based on having done it with so many other languages before.

If it's not too unusual, it feels similar to other tools you've picked up before. If it isn't it's interesting.

Something like:

"Oh, OK, Swift has a switch right? Yeah. Does it require me to explicitly break? Yeah. Can I give ranges or patterns?

That's cool, they use named parameters in Smalltalk style, probably comes from Objective C, right?

Nil! charming, like Golang or Pascal.

What do you call these ?. and !. 's? Reminds me a bit of ?. in JavaScript. It's nifty: you can enforce a value not being nil or specify a default..

Hmm, these guards are interesting, how do they work... Etc "

So obviously you need to get someone to check for footguns in your code, but after enough playing with toys you tend to get to a place you can write solid code in a new language very quickly, and where getting to a solid level of competence is relatively quick.

Re: Polyglot programming and the benefits of mastering several languages

#54

“Mastering” is a tricky term to use here. It could imply simply gaining a level of competency/proficiency that means you basically can use the language to accomplish things without feeling owned by the language. I think this is the kind the author is getting at. But mastering can also mean rising to a guru level of proficiency where you can do things with the language that the majority of your peers cannot. I find th…

I like splitting it into competency and expertise. In my own personal experience, you can be competent with as many languages as you want, but most people can only hold expertise in a few at a time. Generally, your expertise is going to be the ones you actually use daily, because use is the only way to deepen your understanding.

I, for example, and primarily a Java and Python developer during the day, so those are my expertise. Those are the ones I feel confident telling someone to come to me with any questions on, the ones that I know the internals of, the ones I can confidently solve most problems in without having to look much up.

As a web developer in my younger days, I considered myself an expert in PHP and Javascript, but I know that I no longer hold that status with them. I could immediately understand if I were to read anything with them, but to start something from scratch I would need some lead-in time, so I'm only going to call myself competent.

I use Ruby periodically today, but not on important enough things that I need to understand it deeply, so again I would only call myself competent. I'll sure put all of those on my resume though, along with other competencies and former expertise.

Re: Polyglot programming and the benefits of mastering several languages

#55
From time to time I've been good enough to think I'm a master of a language. But that skill fades so fast. For some reason the mountains of trivia just sort of fade away without pretty regular use.

Once upon a time, I could tell you all the semantics of `static` in C, but now I couldn't even give an accurate count of all the ways it's overloaded. There's like the top level declaration that sets aside memory, there's the declaration in a function that has slightly different initialization rules and is good for coroutines. And like, 4? more meanings in different locations. I only hit that level because of a compilers class.

I feel like I could ramp back up, but the subtle nuances just sort of flit away like butterflies.

More than 2 seems really challenging. Even simple stuff there's not much to scheme, but try getting a chez runtime running on a raspberry pi, and really understand the impact of the flags you build with and run with. Not easy (for me) to stay really sharp with that.

I mean, sure, I can bang out some code. I can pattern match well enough that code I contribute blends in with the style of a project. But mastery? That's a big lift.

Re: Polyglot programming and the benefits of mastering several languages

#56

As I master my 15th or so language, I can't help noticing how often I have to search online for the simplest of tasks whenever I switch languages now because it's all turned into a big jumble. Does it need parentheses or not? How are closure variables managed? Do I need to release things? Do lambdas require scoping braces or not? What's the damn syntax for them again??? Do I need to use case(X), switch(X), when(X), s…

I've dealt with 5 different databases this week. Is it SHOW CREATE TABLE blah, DESC TABLE blah, DESC blah, sp_help blah, \d blah? Is this the database that supports CROSS JOIN? What exactly can I do with aggregate functions and a GROUP BY in this database again?

Re: Polyglot programming and the benefits of mastering several languages

#57

“Mastering” is a tricky term to use here. It could imply simply gaining a level of competency/proficiency that means you basically can use the language to accomplish things without feeling owned by the language. I think this is the kind the author is getting at. But mastering can also mean rising to a guru level of proficiency where you can do things with the language that the majority of your peers cannot. I find th…

I am disenchanted with "guru level" work in a language. The old saying about "if I'm just barely smart enough to write the code, I'm not smart enough to debug it" is true immediately, and then even more true if there's a 3-6 month delay.

I appreciate being back in a language long enough to not have to look things up all the time, but the dialect of all of them I write in gets simpler and simpler over time.

Portable guru knowledge like "I know how to write an interpreter/compiler" and "I know that for this task there must be a library in $LANGUAGE" and "I know that language construct/function call looks simple but it has to be an O(n^2) algorithm for it to be doing what it says its doing" is much more useful.

Re: Polyglot programming and the benefits of mastering several languages

#58

I think I’ve now reached a state where I only need two languages: - Rust for when performance really matters - F# for everything else and React Do I miss out on features from other languages? Probably, although it’s not worth the extra learning and switching at this point for me. I guess I’m fortunate enough that I can pick my work.

Agreed, I've found that "high level, mainstream ecosystem" is good for just about everything, and that I like a low-level Rust/C/Zig for tinkering.

One thing I haven't remedied is scripting/glue... I really don't love bash, but I also feel dirty using some full-blown scripting language while Scala sulks in the corner.

Re: Polyglot programming and the benefits of mastering several languages

#59
I think only very few people can be really proficient in more than 3-5 programming languages (at the same point in time). And with really proficient, I mean both a good understanding of the programming language semantically, being aware and keeping track of newer features in the language and having good knowledge of the standard library of the language (and potentially other common libraries). If you are not proficient in a programming language, you cannot work efficiently with it.

Personally as a backend .net developer, I consider myself proficient in C#, I know some basic SQL, and some basic TypeScript and JavaScript. Earlier on I have touched Basic, Pascal, Haskell, Prolog, Scheme, Ruby, Bash, Java and C. I have worked with several different programming paradigms and I have no doubt that this made me a better developer. Still, I don't consider myself a polyglot programmer. Even though I was proficient in Java and C earlier on, nowadays I would have to search basic things all the time if I'd work with those languages again. So that would not be efficient at all.

In my opinion, the concept of a polyglot programmer is only useful if it means a certain level of proficiency in multiple programming languages and that requires a lot more than understanding the syntax of those languages.

Re: Polyglot programming and the benefits of mastering several languages

#60

“Mastering” is a tricky term to use here. It could imply simply gaining a level of competency/proficiency that means you basically can use the language to accomplish things without feeling owned by the language. I think this is the kind the author is getting at. But mastering can also mean rising to a guru level of proficiency where you can do things with the language that the majority of your peers cannot. I find th…

> … a tricky term to use here

Strange to me that no one has mentioned fluency (as programming languages are languages).

Post reply on HN