Earlier quoted context omitted.
Imba includes syntax for tags (scroll down to "Tags"), virtual DOM diffing, event handling (with touch support). Yes, React is not a language in itself, but there's quite big overlap in what Imba does and what React+JSX does. You build UI components like this: tag event event.title "Happening on {event.dateString}"
I find the structure of an Imba app rather intriguing; the view+rendering (i.e. tags) almost looks like an upgraded HTML/HAML (possibly akin to EnyoJS). http://imba.io/#/examples/todomvc/app.imba (this annotated app is illuminating, and ought to be put upfront on your site if possible) The methods are clean and readable: tag #app def dirty persist render def add title if title.trim TodoList.push(TodoItem.new(title.tr…
Imba – A new programming language for the web
111–120 of 180 posts
Re: Imba – A new programming language for the web
#112I like the way it looks. A lot. Love, love the tags. Really like the simplified object literals. The use of global variables for class state is deeply troubling - they are not scoped at all. The parser is far too forgiving. if you change do |x| xx into something like do x xx it will compile fine, but be wrong. The tooling is quite nice, and I like the defaults - although it's still a little bit of a mystery where the imba.js file comes from in the Hello World browser example (I ended up just copying it from Github). I'd like to see argument comprehensions, and the option to generate code outside of an immediately excuting function (so I can play with instances at the dev console)
I would like to see a "strict" mode for imba that chokes on a do block without pipes, for example. I think that if JavaScript has taught us anything it's that anal compilers might frustrate us at build time, but that frustration is nothing compared to the frustration down the line when things break at runtime.
Re: Imba – A new programming language for the web
#113Earlier quoted context omitted.
I find the structure of an Imba app rather intriguing; the view+rendering (i.e. tags) almost looks like an upgraded HTML/HAML (possibly akin to EnyoJS). http://imba.io/#/examples/todomvc/app.imba (this annotated app is illuminating, and ought to be put upfront on your site if possible) The methods are clean and readable: tag #app def dirty persist render def add title if title.trim TodoList.push(TodoItem.new(title.tr…
How does it handle data binding?
- the appropriate method is called [e.g. add]
- which mutates the state [e.g. TodoList.push(TodoItem.new(title.trim))]
- and then render is called, which updates the view/DOM
So in a sense it's not really data-binding, IMO - instead, the render method contains the entire view + view logic, and it gets called each time the state is changed.
Re: Imba – A new programming language for the web
#114Personally, I am really over the white-space as a delimiter in my programming languages. I used to love python but that is a long lost love.
"You're gonna indent it anyway!"
"If you mess up your indentation, you're in hell."
"Tabs or spaces? If the latter, how many of them?"
"On what particular character will I be able to hit % to find where the related block is started?"
...
Re: Imba – A new programming language for the web
#115Earlier quoted context omitted.
This comes directly from Ruby via Coffeescript. It's aligned with a general approach of reducing syntax noise, and it can result in some really nice, clean code. It leads to a whole class of syntax possibilities, like implicit returns. There are probably some performance arguments against this in the case of Coffeescript, especially wrt constructing expensive return values that are immediately discarded. The consiste…
I think Ruby got it from PERL... And I'm not sure if PERL was the first language to use these, either. EDIT: of course, there's Smalltalk, where postfix conditionals and loops are the only form available. Maybe Ruby got inspired by those.
Re: Imba – A new programming language for the web
#116Re: Imba – A new programming language for the web
#117Re: Imba – A new programming language for the web
#118I for once would appreciate it if Ruby programmers would stop trying to avoid writing JavaScript by writing their own JS-based implementation of Ruby. With ES6 and Babel this "new programming language" provides nothing interesting other than making your code look more like Ruby.
Here's a quick (incomplete) list of web innovations you can thank the Ruby community for either popularizing or inventing outright: * REST * Many parts of ES.next * Front-end build tools * CSS pre-compilation * JS transpilation I spent years happily using multi-line template strings while JS developers informed me how idiotic I was for using a transpiler. Since Ruby's goal is to be a language that brings joy to the u…
Re: Imba – A new programming language for the web
#119Earlier quoted context omitted.
> some aspects of Ruby's syntax are well-loved. By Ruby programmers. Why is it that Ruby programmers are incapable of imagining anyone doesn't love Ruby? This isn't a universal truth for all programmers either. I've met plenty Java programmers willing to admit the shortcomings of Java, I've met PHP programmers painfully aware of the language's warts, I've even met Python programmers willing to admit Python's limitati…
By Ruby programmers. And clearly other people – or we wouldn't be seeing those syntax elements in other languages. Why is it that Ruby programmers are incapable of imagining anyone doesn't love Ruby? They're perfectly capable of that, and I think you've let your own prejudices cloud your judgement. I've yet to meet a Ruby programmer who doesn't believe that Ruby is the best thing since sliced Jesus. Hello, pleased to…