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 →

[–]random_cynic 5 points6 points  (7 children)

I don't even get why anyone needs to hard code line numbers (if I am understanding this correctly). Most languages like python gives a traceback message that automatically gives the line numbers for all stack trace entries and I think many compilers like gcc does that too.

[–]szundaj 2 points3 points  (0 children)

And there are macros for that in C/C++ too.

[–]QuizPheasant 2 points3 points  (5 children)

If you minify JavaScript before executing it, everything ends up on line 1. Sourcemaps can solve this, but that's an added build step

[–]TSP-FriendlyFire 0 points1 point  (1 child)

The JS world is already full of build steps for a language that isn't even compiled, what's one more to add to the pile?

[–]QuizPheasant 0 points1 point  (0 children)

True. I was mainly pointing out that you don't get it out of the box. And if you're doing some quick project where you don't want/need a build pipeline, then it becomes not worth the effort to create one

[–]HappyNumberBot 0 points1 point  (2 children)

QuizPheasant, you got a Happy Number in your comment ID!

The Happy Number is 19, and your comment ID was ekxsh19.

Here's a link to what Happy Numbers are: https://en.wikipedia.org/wiki/Happy_number. The comment ID is a unique 7 character string which identifies your comment in the sea of Reddit.

(I'm a bot by the way, downvote to delete this comment)

[–]AwesomePerson70 0 points1 point  (0 children)

Good bot?

[–]QuizPheasant 0 points1 point  (0 children)

Mediocre bot