Re: Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread Axel Rauschmayer
> Not quite, the mechanism which does this in the spec is SetFunctionName > (http://www.ecma-international.org/ecma-262/6.0/#sec-setfunctionname > ), and > it only works for specific syntactic constructs (eg, `foo = function()

Re: Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread Jason Kuhrt
Oh shoot, that’s my misunderstanding of his response I guess. So back to square zero. > On Sep 16, 2015, at 9:44 PM, Caitlin Potter wrote: > > Not quite, the mechanism which does this in the spec is SetFunctionName > (http://www.ecma-international.org/ecma-262/6.0/#sec-setfunctionname >

Re: Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread Caitlin Potter
Not quite, the mechanism which does this in the spec is SetFunctionName (http://www.ecma-international.org/ecma-262/6.0/#sec-setfunctionname ), and it only works for specific syntactic constructs (eg, `foo = function() {}` ->

Re: Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread Jason Kuhrt
Also I disagree with your assessment that I should go talk to the vendors. For example Axel R.’s recent post on Function names http://www.2ality.com/2015/09/function-names-es6.html states in Section 2 the case where there is no name. I cla

Re: Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread Jason Kuhrt
For some reason the email I wrote was cut off. In practice the stack trace gets worse, my test was just too easy. The last stack trace was based around using compose from ramda. The stack trace result was: ``` Error: Invariant Violation: createClass(...): Class specification must implement a `r

Re: Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread James Kyle
Okay, let's break this down. Your example stack trace is really not a bad story. > Error: Invariant Violation: createClass(...): Class specification must > implement a `render` method. >     at invariant >(/Users/jasonkuhrt/code/test/node_modules/react/lib/invariant.js:42:15) >     at Re

Will FP ever have a great Stack Trace story in JS?

2015-09-16 Thread Jason Kuhrt
For example, today, a stone from the bedrock of FP: > ``` > let compose = (b, a) => (...as) => b(a(...as)) > ``` will cause a JS Stack Trace to go from something useful (space around useful line) like: > ``` > Error: Invariant Violation: createClass(...): Class specification must > implement