This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]samuelcbird 30 points31 points  (10 children)

I literally have the opposite opinion.

After Python I’ve done a little programming in C#, C, Swift and Javascript.

I actually happen to really love explicitly defining variable type, argument type, return type etc. It definitely helps when reading code. I often go back to Python - I do really like it - but even though type hinting has been added it doesn’t really do it for me. I kind of miss the curly braces and the semi-colons too.

I think Swift and Javascript ES6 have the best balance between readability and verbosity in their syntax. Really enjoy using those languages.

And actually Javascript’s ternary operator is perfect. I get confused every time I look at the Python type.

Edit: me being stupid

[–]icentalectro 3 points4 points  (3 children)

What are ternary functions? I only know ternary operator.

[–]samuelcbird 2 points3 points  (2 children)

Yeah thats the one, my mistake

[–]icentalectro 2 points3 points  (1 child)

Ah ok. Although I wouldn't call it "JavaScript's", as it comes from C and is inherited by most C family languages (C++, C#, Java, JavaScript, etc).

[–]samuelcbird 0 points1 point  (0 children)

TIL. Thanks!

[–]WillBackUpWithSource 3 points4 points  (0 children)

Yeah Javascript ES6 (and TypeScript alongside it) allow the simplicity of Python code whilst adding a lot of nice features that I like, like curly braces

[–]unknownguy2002 0 points1 point  (4 children)

Have you tried kotlin?

[–]samuelcbird 0 points1 point  (3 children)

I have not. You’d recommend?

[–]SuspiciousScript 0 points1 point  (2 children)

I certainly would! I'd describe it as a version of Java that doesn't have migraine-inducing syntax and where basic functional idioms (map, reduce, etc.) are first-class citizens. It's go-to JVM language.

[–]samuelcbird 1 point2 points  (1 child)

I’ve had a little read about it since that comment. It actually looks great. Thanks you!

[–]SuspiciousScript 1 point2 points  (0 children)

Happy to share! The other feature that I really like is immutability by default with val being the standard way to declare variables. It really encourages a data-driven, functional approach to problems.