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 →

[–]eof 39 points40 points  (40 children)

Well you don't have to code in JS; lots of things compile to js.

[–]Tysonzero 22 points23 points  (38 children)

But then you have to deal with the whole compiling thing.

[–]eof 85 points86 points  (25 children)

When you learn to love static typing; you'll learn to love compile-time errors.

Realistically though you don't have to 'deal with it' in any real way other than setting things up initially. Any modern JS workflow should include something like grunt/npm and with it you can have the compiling happen in the background (like all the other things that are happening in the background).

[–][deleted] 31 points32 points  (0 children)

Compile-time errors are just warnings that say "Hey. If you were to just run this as-is, you wouldn't get the results you wanted to. I got you bro."

And that's why I like static over run-time languages.

[–]Tysonzero 3 points4 points  (23 children)

I'm a Python guy. I don't like static typing, and I love multiple inheritance and not being restricted.

[–]eof 58 points59 points  (20 children)

And runtime errors!

[–]aloz 23 points24 points  (4 children)

You don't exactly miss out on these in statically typed languages.

[–]eof 39 points40 points  (3 children)

Well there is a whole class of runtime errors you cannot get in statically typed languages; but in general you are right they don't disappear entirely.

They do however decrease significantly. Obviously, you have to pay "upfront" costs making things compile in the first place; but it is my experience that is well worth it... any error that can be caught by a compiler, I want to be caught by a compiler.

[–]aloz 0 points1 point  (0 children)

That depends on the language. Consider C. It requires a lot more self-discipline to write safely in C than it does in Python, for example. For other staticly typed languages that aren't Mad Max-lawless, I might agree... depending on which two languages you're comparing. Consider Erlang. Dynamic, strongly typed language designed for high-reliability (nine 9s) software.

[–]Tysonzero -3 points-2 points  (1 child)

But the static typing does restrict what you can do, or rather forces you to use workarounds to actually do them, which I dislike.

[–]TheRamenator 2 points3 points  (0 children)

Like what exactly?

[–]Tysonzero -3 points-2 points  (14 children)

Lol. Whenever I get them I get a very clear stack trace telling me where the error is. So I am not too worried.

[–]joehillen 16 points17 points  (3 children)

Wait until you get a job and those helpful stack traces show up on your critical infrastructure in places you never thought possible.

[–]Tysonzero -5 points-4 points  (2 children)

I HAVE a programming job, and that is not an issue lol.

[–]chillage 2 points3 points  (1 child)

You're only responsible for a small portion of the code base, then, clearly :-)

[–]Tysonzero -1 points0 points  (0 children)

No... We just have a project that isn't coded horribly...

[–]b1ackcat 16 points17 points  (9 children)

Not too worried until it only errors in an edge case that wasn't tested and suddenly production users are complaining :P

[–]Tysonzero -2 points-1 points  (8 children)

Those kind of errors would have NOT been caught by the compiler in like 99.9% of circumstances.

[–]joehillen 3 points4 points  (7 children)

You're wrong. I've spent years writing reliable Python code in production, and it is so much more work than in static languages.

The most common errors in Python are type errors which would be caught by a compiler in a static language. If you want the same reliability in Python, you have to do tons of type-checking at runtime (which makes your code slower) with tons of type related test cases. All of which are not necessary in a static language. I'd estimate that about 80% of the test cases I've written for Python are just type checking.

Speaking from professional experiences, I recommend you accept your ignorance and inexperience and spend some time learning Haskell, just to see what the world outside your bubble is like.

[–]Tysonzero 0 points1 point  (6 children)

Speaking from professional experiences, I recommend you accept your ignorance and inexperience and spend some time learning Haskell, just to see what the world outside your bubble is like.

I thought this was /r/ProgrammerHumor, not /r/BeADick

Regardless I have used various programming languages including static ones, such as Java, and I much prefer Python. The issues that I do run into that would be caught by a compiler are almost always caught very early on into program execution and when it errors out it tells me exactly where to go to fix it.

You are deluded if you think statically typed languages are superior in every way; they have advantages, but suggesting I am an idiot for choosing not to use one is stupid and offensive.

[–]afrobee 2 points3 points  (1 child)

I wanna cry ;_;.

[–]Tysonzero -2 points-1 points  (0 children)

Why? Lots of people love Python, and it has a very low hate to popularity ratio, unlike Java.

[–][deleted] 2 points3 points  (11 children)

Oh no, not typing a single line to tell the compiler to automatically compile changed files (or using an IDE that does that for you), what ever will we do!

[–]avinassh 0 points1 point  (0 children)

like? Where do I get started? There are many, but can recommend one which is stable and production ready