I'm Sindre, CTO at Scrimba.com. We're about to launch a major overhaul of Imba, the programming language we use for everything here at Scrimba. The...
For further actions, you may consider blocking this person and/or reporting abuse
Yes!!!
I can finally write html, css, and js without writing html, css and js.
I read this comment as a sarcastic take on the trend of moving markup and styles back into js, but Eric is among a group of very few people who have been using Imba for a very long time already :) He was the driving force behind support for styling in imba!
Haha. Not sarcastic. I love Imba. No going back. I think it's been 4 years since i first started using Imba.
Embracing tailwind style is a great idea. Kudos
Memoized DOM looks awesome but syntax is really not for everyone
IMO it looks messy as there is no separation of concerns nor separator for instructions.
I understand the "more dense code" logic but it's a honey trap.
Separators exists for readability & comprehension, not to annoy people or loose time.
Came here to say something similar.
IMO, Imba is a DSL for JS framework diehards. For most devs, this language will be too syntactically different. There are too many key words, and the flow is difficult to follow.
That said, I imagine this would be good for fast paced freelance style work. Once learned, you could probably pump out web-apps by the hour.
Too syntactically different?... developers are so blinded nowdays that they even could see a clean and easy language. Imba is extremelly easy and very human friendly, very similar to Ruby and Python. But ok, let continuous to be verbose. Lets write ugly React code.
Verbosity isn’t a BAD BAD thing if it helps readability and comprehension. I also think the comparison with Python isn’t valid. Python isn’t a DSL aim to handle content markup, style and business logic.
Ruby & Python are old languages and were not designed to be used in Frontend context. It just makes no sense. It would only be useful for backend people coming for some frontend gigs without the deep comprehension of what's really going on in Javascript.
What you call "human friendly" is YOUR opinion. If "human friendly" is just writing "sentences" with spaces as only separator, then I except your code to have the same flaws as humans sentences have: lack of explicit instructions and interpretation issues.
However Javascript & web standards exists without your opinion and millions of devs around the world are very ok with it.
Imba may just be sugar for lazy backends ... (Except memoized dom, this can be pretty good)
Creating new syntaxes may just split our strong community into pieces, and force developers to make a choice and loose job opportunities. Vue & React are close enough to be able to make a switch if needed, because they still rely on JS comprehension.
Imba doesn't...
Verbose is not wasting time, verbose is just explicit...
You loose a small time once while writing it, but you win time in readability/comprehension every time you go over that code again.
It's like tests...
There are many languages in the world, and room for plenty more. Don't worry, IMBA won't "split" the JavaScript community -- JS is way too huge.
I disagree with "or most devs, this language will be too syntactically different. "
To me comming from Ruby/Elm/Elixir/CoffeeScript this actually looks very intuitive. Much more so than other JS frameworks I used, like React or Angular.
JS devs have many JS-transpiled languages to choose from, and now they have another. Great!
Thanks for talking a look! I understand your initial reaction, the syntax is definitely not for everyone. I don't think it's a honey trap though. I agree that some of the examples may even go too far on not using separators and parenthesis, but it is not like you cannot use them. It is similar to Tailwind in this regard. Looking at it initially it is a lot to take in, but it doesn't take that long to learn, and once you've learned it you're not going back :)
People learn new languages all the time, and new languages are introduced all the time. No one is forced to learn it. By your logic no one should ever introduce a new language because someone might have to learn something new. The horrors!
I'm a strong supporter of separation of concerns. Also a huge fan of reducing typing and eliminating verbosity. Why couldn't Imba do both?
Looks interesting!
Thank you
I applaud all efforts in improving the tools we all use to make great things! I'm not deeply invested enough in any of these to give a thorough and fair comparison, but generally I do think Imba is the most balanced among them.
Elm, purescript and reasonML are a lot further from js in terms of semantics and ecosystem from my (shallow) understanding. Mint-lang is certainly interesting. Svelte also shares many of the same ideas, but Imba is more opinionated for good and bad.
The support for styling in imba is truly special. Just like tailwind it looks messy at first glance, but the learning curve is not really that steep, and it feels like a super weapon once you master it.
The syntax is imho very elegant and concise, but I'm sure it will appeal more to those coming from ruby than from c-like languages. Most frameworks and languages (including svelte and mint-lang) stick to the jsx-like syntax for tags. Imba takes a much more opinionated approach with flexible event modifiers and powerful touch handling etc right out of the box.
Could imba be used with an existing large backend written in another language like Elixir or Ruby?
We still lack examples and starter-templates for these use-cases, but it should be relatively easy to set up.
What are the current limitations & drawbacks of using Imba?
Imho, the main limitiation is documentation. Too few examples, too many concepts not covered. Also, since Imba is so concise, it is easy to shoot oneself in the foot by not caring about abstractions and separations of concern before your knee-deep in a huge single-file application. As for the language, I think there will be many more pleasant surprises that are not quite clear when you start using it :)
Thank you Sindre for a thorough answer, I will certainly try out Imba :)
@somebee Could you mention, what current features are lacking/WIP? Or maybe there is a Roadmap?
Just trying to guage what limitations are.
i.e. with Elm the limitation (for my projects) turned out to be the delibirate slow release schedule. Creator of the language addressed it many times and gave his (valid) reasons for doing so. But if I knew about that beforehand, I might have not chosen Elm for a project, despite ti's no-runtime-errors guarantee.
I will try to put up an official roadmap soon. There are definitely features lacking, but I wouldn't hesitate using it in production. There are things I plan to add, like custom SVG components, but nothing major missing for v2.
Our problem is rather too frequent releases. The main reason we haven't officially moved to beta is that it feels easier to release very frequent updates while in alpha.
:) That's a good problem to have :)
@somebee I started going through docs on imba.io website ❤️, and one thing that I found missing/WIP ( for my use cases) is global state-managment Redux-like.
I understand it's possible, but can't find a doc or an exmple or a video-tutorial of one. I noticed you recorded a lot of meetups - is there one per-chance where you discuss & show it?
Documentation on state is right around the corner and is being discussed in the Discord community right now, but here's a quick answer:
How do I manage global state?
/Where do I use Vuex/Redux/Mobx?
The answer is mind boggling because of how simple it is; you don't. It kind of feels like something is missing, coming from the big web frameworks where thinking about state is a huge part of the day to day work.
When working with the web directly, instead of through the virtual DOM layer of abstraction, it can be as simple as this:
1) Make a new file for state to live in - for example
state.imba
2) Export a regular Javascript object to use as the default state - for example:
That covers the concept of global state,
MUTATIONS
andGETTERS
. For the concept ofACTIONS
we can add this, for example:3) Use it wherever you need. Here's a full app that imports the state above and uses it for an important calculation:
Here's a little repo of the above example: github.com/codeluggage/imba-basic-...
Wow . This is awesome !
One more question:
Can you bind to state ? If state changes from one component can you force an automatic update in another component connected/dependent on the same state variable ?
Feels like Python with the power of Ruby and a slight flavour of Coffeescript, with amazing code density, and continues to be 100% compatible with Javascript.
A dream comes true :-)
And if you give a change, it is very easy and clean.
Imba looks appealing a lot. Great work folks!
👏👏👏
I've been using Imba v2 in alpha/beta for 6 months now and I can honestly say there is nothing else like it.
The speed, the convenience and the way you can use component styles are truly special.
You almost have to be a machine, remember shortcuts. See just how human is not need to close the tag .... the machine needs to know where it is closed not you, like in Python...
It is like Ruby or Python or Tailwindcss, some will love other will hate. I use it and is quite impressive!!
I can start using it when there are extensions for vscode like snippets.
Let me know if there are any
What kind of snippets are you thinking? The ability to create your own snippets? Imba has a vscode extension that is relatively robust with autocompletions and refactoring tools etc.
Wow nice
No I am just asking about autocomplete and auto import kind of extension.
This is the expected behavior
Thanks 😊
Why scrimba do not have a Imba course?
Yes, we've been waiting until v2 is ready. There will definitely be a course on Imba this year :)
I think they will, maybe because they just finish the v2 this year and have so much change over v1.
@somebee : with regards to typing, is it possible to type the output of functions as well?
Also, can we create interfaces and types, like in Typescript? Would that just be done in TS files, and imported and used in.imba files? Or does Imba itself have support for these features?
Overall, this looks very interesting, but a feature-set that can compete with Typescript would probably be the biggest barrier to adoption for me.
It is not currently possible to annotate the return type of a function without resorting to a jsdoc comment above the function declaration. This is currently a limitation that I hope to resolve before final v2 release. That said, I find the type inference of typescript very powerful, so if you use typed parameters etc it will almost always infer the correct return type.
We're considering support for creating types and interfaces, but for now you'll need to do that in separate .d.ts files :)
Does the react comparison take into account using React.memo()?
Update:
Found the source:
github.com/somebee/dom-reconciler-...
I don't see the memo method being used, would it make sense to enable memorization?
Otherwise I feel like we are comparing oranges and apples here. :)
Implying React does not support memorization because it's not enabled by default seems a bit misinformed. :)
Wooohoo, it's been some time since I've heard of Imba. Congrats on the new version (if you call it so).
Same thing here – If it were good ol' HTML/CSS/JS (or as close as possible) it would be awesome