
Highland.js - callum85
http://highlandjs.org/
======
andersriutta
Highland is a great option, even easier to use than Caolan's previous library
Async.js.

Re: Highland vs. RxJS, RxJS operates at a lower level interface [0]. As a plus
for RxJS, Reactive Extensions are available for multiple languages, not just
JS [1].

[0]
[https://twitter.com/_ericelliott/status/551814104231723009](https://twitter.com/_ericelliott/status/551814104231723009)
[1] [https://github.com/Reactive-
Extensions/RxJS/blob/master/doc/...](https://github.com/Reactive-
Extensions/RxJS/blob/master/doc/mapping/highland/whyrx.md)

~~~
mattpodwysocki
RxJS author here. Right, an advantage is if you know the Java, .NET, Python,
C++ version, etc, then you know the JavaScript version. That and we try to
adhere to an Array#extras style following all of ES2015/ES7 Array methods.

Another advantage is that many frameworks such as Angular 2.0 are shipping
with support for Observables, so that's a huge win for users of RxJS that it
automatically just works.

~~~
lmeyerov
Yep I'm confused why Highland exists. Maybe if it was a sugar layer over Rx?

------
vlucas
Nice library, but _please_ don't use the underscore variable (_). So many
people use Underscore.js and Lodash.js that it makes reading your docs
confusing.

~~~
choward
You can name it whatever you want. That's one of the benefits using a module
system.

~~~
hamburglar
So why do we have this trend of using meaningless and ambiguous identifiers,
and in particular, why would you do it in example code? I thought that as an
industry, we'd moved past the folly of giving things terse and unhelpful
identifiers in order to save a few bytes or keystrokes.

~~~
jamesrom
You notice that all the libraries that do this (underscore, jQuery, Lodash, et
al.) offer features that are almost language features. Things so useful but
generic that they could almost be integrated into the language syntax.

In this case, there's also the problem that 'Stream' is already used by node.

~~~
hamburglar
> In this case, there's also the problem that 'Stream' is already used by
> node.

Haha, well, your grandparent would like you to know that's no reason to avoid
a particular name. Module system! ;)

    
    
      > var BoringStream = require('stream');
      > var Stream = require('highland');
    

Or if we like special chars, we could get really cute:

    
    
      > var $tream = require('highland');
    

It's like Stream, but, you know, blingier.

------
rikkus
Looks similar to Lazy.js (to my uneducated eyes) and also rx.js. To the
author: Why should I use Highland.js instead of either of these?

~~~
mattpodwysocki
RxJS authoer here. Instead, here are the reasons you may want to consider RxJS
instead of Highland [https://github.com/Reactive-
Extensions/RxJS/blob/master/doc/...](https://github.com/Reactive-
Extensions/RxJS/blob/master/doc/mapping/highland/whyrx.md)

------
bstar77
Very interested as I use Async.js in virtually all of my node projects. I'm
liking the idea of a 'toolkit' approach more than Async (which just feel like
a monolithic lib), will definitely be trying it out soon.

~~~
tericho
async.js changed my life, async programming can get out of hand in a hurry.

------
Kiro
So what's the benefit of using streams instead of a normal array?

~~~
draven
Processing data as it becomes available instead of waiting for the whole
thing, amongst other things (that's what we do in Scala anyway.)

------
zxcvcxz
What's the deal with non descriptive titles on HN?

~~~
toxicFork
Yes, I would prefer if they mentioned what it did in a few words instead.
Maybe they are aiming to trigger curiosity.

------
dopamean
Is this similar to what transducers do in Clojure? My understanding there is
that they allow you to do things like map over core.async channels.

~~~
notduncansmith
According to my understanding of transducers (warning: possibly inaccurate),
that's one use-case of transducers. Transducers are a way to let you map over
_anything_ , including (but not limited to) channels, streams, etc.

------
akilism
I love highland one of my go to libraries these days.

------
thoughtpalette
"This site or app is sending too much traffic to rawgit.com. Please contact
its owner and ask them to use cdn.rawgit.com instead, which has no traffic
limit."

------
doobiaus
If it's not a drop in replacement for underscore or lodash, please don't use
"_".

~~~
epidemian
I see nothing wrong with using "_". It's just a variable name. The first
snippet of code and preceding paragraph are:

> If you prefer using highland under the name _ like is done in the examples
> below, you can then simply use: > > var _ = highland

So it's not like you are required to use "_". And if it is a local variable,
there is no risk of colliding with Underscore.

------
jozzas
" If you prefer using highland under the name _ like is done in the examples
below, you can then simply use:

var _ = highland"

No. No, no, no. Goodness me.

