-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LiveScript 2.0.0 #943
Comments
Related discussions: #683, #705, #811, #821, #903, #910 I believe that converting LS AST to Babel AST is the most easier way to generate latest ES code, and already started working on it. The preliminary convert function can handle a = -> (a) -> a = b = (b) -> a = b = it generates this: let a;
a = function (it) {
return function (a) {
let b;
return a = b = function (b) {
let a;
return a = b = it;
};
};
}; Basic node types ( The plan is turn import to import lodash
import lodash: _
import lodash: *: _
import lodash: {merge, set, omit: skip}
import \side-effect or import
lodash
lodash: _
lodash: *: _
lodash: {merge, set, omit: skip}
'side-effect' to import lodash from 'lodash'
import _ from 'lodash'
import * as _ from 'lodash'
import {merge, set, omit as skip} from 'lodash'
import 'side-effect' and import options: location: {host, port} to import location$ from 'options'
const {host, port} = location$ and export {name0: local, name1, module: {name2, alias: external}} to export {local as name0, name1}
export {name2, external as alias} from 'module' |
don't go to the dark side. const's, let's and other classes just go imerative way. It's right there, in Ecma, why not using ES? - just don't make LS worse. |
I am interested. By the way, Livescript 2.0 should support html (jade's structure) syntax inside in order to use React product-row = React.create-class do
render: ->
<tr
<td
<span
if @props.product.stocked
style:
color: 'red'
@props.product.name
<td @props.product.price
|
We can use React in similar way at this time, with additional commas: require! react: createElement: h
#Coming s∞n: import react: createElement: h
function product-row product: {stocked, name, price}
h \tr,,
h \td,,
h \span if stocked then style: color: \red else,
name
h \td,, price +1 for HTML-like syntax. Maybe we can omit function product-row product: {stocked, name, price}
<tr
td
span if stocked then style: color: \red
"#name"
td "#price"
"additional text" |
@askucher I don't see any profit of specific syntax for that, React already provides React.DOM object that you could use, it contains most of html-tags (React html-tags) that you need provided as object keys. |
I would very much welcome development on Livescript. It is my favourite compile-to-javascript language, but it gets increasingly more difficult to justify its use to customers and even employers, as everybody seems to love ES6 so much. Personally, I think Livescript could use some streamlining (like, do we need |
@sra448 I personally need |
Separation of concerns? |
I think we need make official, we have the people to help, so let's do it! I think we need first create a repo like https://github.com/coffeescript6/discuss to discuss new implementations and collect some proposals. |
The name livescript is taken but not used at all, could we claim it and use it as our organization name? |
I'd love to help with the development. I'm looking for a pet project.
…On Sat, Jan 21, 2017 at 7:49 PM, dk00 ***@***.***> wrote:
The name livescript <https://github.com/livescript> is taken but not used
at all, could we claim
<https://help.github.com/articles/name-squatting-policy/> it and use it
as our organization name?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#943 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABlJuLMIcX6FHx1vDrQ0_S-4or1WO3m8ks5rUqeCgaJpZM4LWpWh>
.
|
Re: @dk00 if you start a new project, I would prefer you choose a new name so there is no confusion (like I chose a new new when I forked coco) |
@gkz I'm satisfied with LiveScript and not going to start a new project. |
Cool! |
Hi! I created slack team for all livescript lovers: Please join and let's discuss there about the ES6 path. I'm willing to put some effort for that too. |
What comes to React, I think its not necessary to try include JSX. I have been perfectly happy with That way I can write (like React Native) code easily like
This removes all the JSX limitations and allows very easy and readable if/else structures too. And if you want to work visually more conveniently with dom, you can simply
Then just
|
@tpisto we already have #livescript on freenode, I vote NO for shlack. It have been discussed before. |
@unclechu You example looks ugly. React provides the syntax where you can combine html + js + css natively and people really LOVE it. This concept generates final javascript which does not require additional treatment and library to support it. And please do not think that livescript language is already developed. Most of people do not think so. Overwhelming majority. Most of them think it is abandoned. |
@askucher It doesn't matter about what I think about is it developed or not. My point is I don't think that your example makes any sense at all, what the different between yours and my example? It's just one single thing - you'd just added But I wonder, what specific thing makes my example 'ugly' and your example, I don't know, 'perfect' or 'okay'? That one additional foreign symbol added to every tag name? I won't believe it. And about this:
Is that to? Isn't JSX just syntactic sugar for |
That's true, but adding |
I have contacted GH staff and claimed the name livescirpt for our organization, invitations are sent to contributors. |
Hi Guys Let me share my thinking about LiveScript 2.0 https://hackernoon.com/react-livescript-livescript-2-0-164d35ca5373#.nkdlaygmw I would like to recommend to discuss there |
I think algebraic data types can help me more than syntactic sugars when I am using React + Redux. |
Sorry for making a hasty comment here before reading the thread, but I'll just input my 2 satoshis, while I have some seconds to spare:
:-) |
if (someVariable) { /* do something */ } (or var reuse) isnt a nice construct? (if you know that someVariable may be [A][B][C] type and to what it will covert) |
I think @dk00's livescript-next is going exactly in the right direction. Hats off to him for doing such a great job. |
@determin1st - I have strong opinions on types in "real" languages (check out Onyx if you want, which syntax I've been inspired heavily from LS for example) (wow, that came out harsch - well, I code probably 2 hours livescript every day, for everything not system-code, so you know I love LS :-) ), but for a new "livescript-like" I'd be happy with just about anything in way of types :-) |
@determin1st I think it's okay when your application isn't more than hundred on lines of code. When application is big enough I can't be sure it's |
imo, you are wrong. it doesnt depend on number of lines of code. it depends on state isolation technique. For example, common imperative style: function compared to this: any way, we should compare what we are talking about in code examples. we may use some tools related to language, which may affect our style. but it's not the language itself. it's all about tools, libs and frameworks. btw, you can define as many 'strong types' with scope you like using only functions. no need to inject them into base layer - language. i've checked Onix readme. why did you select "--" as a comment? it pushes me to doubt that "b[--a]" syntax may be used some day. |
@determin1st - Yes, let's not hijack thread here, but it simply was the most natural comment prefix I could thinkg off: that's how I always write comments on paper when i pseudo-code at a cup of coffee. I've tried to find the most "natural" ways of expressing the code I would think of. |
Any plans for a second version?
The text was updated successfully, but these errors were encountered: