loading...

What was the most irritating quirk for you when you learned another language or stack?

jasterix profile image Jasterix ・1 min read

I've been learning .Net for work, which isn't too challenging. But after working with JavaScript for a year, having to use Pascal Case is the most annoying difference between the two languages.

Even after a few weeks working in C#, I still find it unintuitive to to write my methods and properties LikeThis (Pascal Case) and not likeThis (Camel Case). It's such a small change, but it still gets me.

What has been the most irritating differences for you when switching between languages or between stacks?

It's really the little things that make all the difference.

Discussion

pic
Editor guide
 

Whitespace being important. I'm looking at you, Python!

 

Does it mean you didn't indent your code before? 😱

 

I just think it was more deadly now 😂

 

Learning JavaScript specifically, handling of this trivially tops the list. It wasn’t my first case of dealing with a language which uses a magic keyword for object self-reference, but the fact that it’s usable outside of object scopes and can have it’s value manipulated by the caller of the function combined with the at times strange scoping rules in JS made it a nightmare to learn to use correctly.

Quoting styles are also a regular source of pain for me when switching languages. There are at least a dozen different ways to quote a string depending on which language you’re using, and some of them may or may not have differing meaning within the language or relative to other languages.

 

Ah yes the C# case style. That is still annoying and that's been my primary language at work for over 5 years.

I would say when using Typescript/Javascript is doing everything with async/wait. But that isn't exactly language specific.

So I'll go with needing to specify the file and import symbol is annoying. What are, programming in C. I'm used to specifying modules, but it isn't a specific file location.

 

Arrays in Lua start at 1 instead of 0. That’s the most annoying thing ever.

 

Array to String joining in Python. The syntax is as follows:

array = ["apple", "banana", "pear"]
separator = ","
separator.join(array)

Why is the action on the separator?! In most other languages, the separator is optional, but here its where you start!

I'm a Ruby guy and my impression of Python at the time was that it more functional.
I would have expected

join(array, separator)
or
array.join(separator)

but not
separator.join(array)

 

Yes, this is pretty annoying. It was designed like this because you can apply str.join to every iterable object, not only array. The same way as len(iterable) is not specific to array but generic and that's why it's not a method of the array like array.len().

 

I am learning React and love it - but it is annoying when writing the JSX and writing class="abc" and forgetting it needs to be className="abc" (which is compiled to class="abc").... and having the compiler throw an error telling me to change it....

 

12 different ways of saying "the" or "a" in German.

 

It was "programming language" tho, not actual, spoken languages 🤯
what about programming in German?

 
  • Python: lambda functions can only have one expression.
  • Python: white space is important.
  • Java: generics, type erasure.
  • Java: checked exceptions.
  • Go: no generics.
  • Go: error handling if statements.
  • JavaScript: ecosystem is constantly migrating to some new hype technologies, it's difficult to keep the pace.
 

For me, it was probably two things.

Back when I learned Basic on the Apple II, there were commands called Peek and Poke. Our first home computer was a TI-99/4A, and their Basic had no equivalent commands.

The second is one that I think most people learning C struggle with, which is pointer syntax.

 

For me, go's bracket style was a deal breaker that means I don't want to learn it. I am fervently against }else{. Curly braces get their own line and I will never budge on that point!

 

Digging in stack traces with non-descriptive error messages of the actual reason of the exception. It's true for new frameworks, libraries, languages alike.

 

try-except in Python. Almost every language has try-catch but Python has to have 'except' :(

 
 

My first programming language was PHP, so I kept getting foreach loops wrong in other languages (PHP has [array as item] and others usually have [item in array])

 

Best practices vary a lot between languages - the structure of the projects is probably one of the most impactful in front-end development and can really speed or slow down development imo.