OH MY GOD IT HAS RISEN FROM THE DEAD KILL IT KILL IT

On Fri, Nov 9, 2012 at 7:25 PM, Mark Hahn <[email protected]> wrote:

> This subject has been beaten to death on this forum and I fear you might
> be starting yet another 100-message thread.
>
>
> On Fri, Nov 9, 2012 at 4:12 PM, Alexey Petrushin <
> [email protected]> wrote:
>
>> Why there are so many negative responses about fibers?
>>
>> I use fibers and it seems very helpfull because:
>>
>> - it removes callbacks and makes code simple and linear.
>> - allow to use global try/catch block that will catch all errors (both
>> sync and async).
>> - performance impact seems to be small.
>> - compatible with streams.
>>
>> A short sample of how code looks like (simple function loading JSON
>> content and parsing it)
>>
>>     var load = function(indexPath){
>>       // `fs2.readFile` is actually is asynchronous `fs.readFile`
>>       // wrapped with fibers.
>>       var data = fs2.readFile(indexPath, 'utf8')
>>       return JSON.parse(data)
>>     }
>>
>>     // All exceptions will be caught, bot sync and async.
>>     try {
>>       var obj = load('/data.json')
>>     } catch(err) {
>>       console.log(err)
>>     }
>>
>> There's no any notion that the code is actually asynchronous, i.e. the
>> abstraction isn't leaky (as with
>> some other technics when You still has to care specifically about error
>> handling or other stuff).
>>
>> So, what's wrong with it?
>>
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>



-- 
Charlie McConnell
Head of DevOps
Nodejitsu, Inc.
[email protected]

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to