8
Endargon
128d

Omg I loath path separators. Been working on windows most of the time (bought a surface pro for some reason) and my colleagues work on Linux. We just do standard web dev stuff nothing special but. I started having issues with my windows build getting weird function.prototype.bind.apply is not a constructor issue. Which is valid because apparently my colleagues started using the fat arrow function everywhere and on places where not needed.......

But on Linux they never had an issue because babel fixed it to the old function during the transpileee. So why the fuck am I getting this problem. After some tedious debugging and asking my colleagues. (colleagues only responded with just use Linux) I found the the issue to lie in the webpack loader for the Javascript in which the path regex used a single / :(. So I changed that to a group to be / or // and bam the whole bloody project works on windows now.

....... My colleagues still don't understand that they over use the fat arrow in the wrong places unfortunately

Comments
  • 3
    Good job fixing the issue. Now it's time to find something that works on Windows and bugs on Linux.

    (Pretty you're going to hear that's it's your fault with, though)
  • 0
    I applaud you for finding a way to fix that!

    on that note, could you point me to an article or explain when the fat arrow does not need to, or should not be used?
  • 0
    You cannot overuse the fat arrow. It's one of the greatest additions to js!
  • 1
    @sadProgrammer well you can use it for a lot. But not as a constructor or for prototypical inheritance if I'm correct. Because the fat arrow is not newable.

    But this all isn't very important if you use es6 classes anyway. But for me it was a specific angular 1 use case because you can't use it as factory constructors etc
Your Job Suck?
Get a Better Job
Add Comment