Questions tagged [livescript]

LiveScript is a language which compiles to JavaScript. It is a fork of Coco which is in turn derived from CoffeeScript.

LiveScript is a language which compiles to JavaScript. It is a fork of Coco which is in turn derived from CoffeeScript. Like those two it has a relatively straightforward mapping to JavaScript. LiveScript is Coco but much more compatible with CoffeeScript, more functional, and more feature rich. LiveScript aims for increased expressiveness and code beauty. While adding features to assist in functional style programming, LiveScript also deeply supports imperative and object oriented programming, and has an optional class system with inheritance, calls to super, and more.

Official livescript site: http://livescript.net

67 questions
0
votes
1 answer

CoffeeScript / LiveScript and data constructors

I have few experience with SML. Now I want to learn LiveScript, but I'm stuck at data types. So, is possible to create type using data constructors like in SML / Haskell / OCaml? If not, what is the preferred way to create data types?
user1518183
  • 4,651
  • 5
  • 28
  • 39
0
votes
1 answer

LiveScript do closure not working

a = 5 do (a) -> console.log a Why does this compile to a = 5; (function(a){ return console.log(a); })(); a is not passed in so it is undefined. Am I doing self executing closure wrong?
Farzher
  • 13,934
  • 21
  • 69
  • 100
0
votes
1 answer

LiveScript class scope this self jquery issues

class A () -> method: -> method2: -> $ 'a' .each -> href = $ @ .attr 'href' @method href In my jQuery function I actually need both scopes, so I can't just change how the anonymous function is bound. I…
Farzher
  • 13,934
  • 21
  • 69
  • 100
0
votes
1 answer

A function inside a class modifies prototype instead of just returning an object

I have this code in LiveScript (1.1.1): class A b = -> { a: 1 b: 2 } It compiles into this: var A; A = (function(){ A.displayName = 'A'; var b, prototype = A.prototype, constructor = A; b = function(){ return prototype.a = 1,…
Fixpoint
  • 9,619
  • 17
  • 59
  • 78
0
votes
2 answers

Livescript, How to end a unnested callback?

Reffering to: http://livescript.net Unnested callbacks and parentheses free chaining: LiveScript <-! $ 'h1' .on 'click' alert 'boom!' JavaScript $('h1').on('click', function(){ alert('boom!'); }); How can I write livescript like this in…
Lhfcws
  • 302
  • 1
  • 3
  • 15
-1
votes
3 answers

Extending object with splat and do

Minor thing but wondering if someone can suggest a better syntax to extend an existing object using a splat, but without using curly braces? My main purpose is to keep indented style while passing the extended object to a function. This has the…
Drew Goodwin
  • 832
  • 9
  • 15
-2
votes
0 answers

Best Plateform for learning javascript in advance?

Can anyone please tell me the best youtube channel for learning javascript from beginnner to advance . I want to lean with good resource and want to create as much projects using javascript . I have tried lots of channel but they are not very much…
1 2 3 4
5