r/AskProgramming • u/sindreaars • Aug 16 '21
I have spent 7 years creating a JavaScript alternative, would love to hear your feedback
Hey all 👋
My name is Sindre, and I am the CTO of a YC-backed startup. For the last 7 years, I have written all my web apps in a programming language (Imba) that works as a clean and fast JavaScript alternative.
In the process of launching a major overhaul of Imba, I wanted to share it with this subreddit, in case anyone are interested in learning more about it. I would love to hear people's feedback as well! All constructive criticism is appreciated!
So, over to the nitty gritty details. Imba compiles to JavaScript and it is meant as an alternative that can give you increased dev productivity. So this is not a toy project or an academic exercise, it is extracted from a real project trying to solve real problems. It has been through countless iterations over the past 7 years, striving to be the perfect language for developing web applications.
In this last iteration, I have added tons of cool things like touch modifiers, inline styles, optional types and great tooling that integrates deeply with TypeScript. With this version I feel that I am very close to my vision for what Imba should be. In other words; it is finally ready for public consumption. I'd wholeheartedly advice you to look into it and give it a whirl if you are interested in web development :)
Check out this video on how to build a counter with Imba in less than 1 minute, or check out https://imba.io for docs and more info :)
Compiles to Javascript, works with node + npm
DOM tags & styles as first-class citizens
Optional typing and deep TypeScript integration
Blazing-fast dev/build tools based on esbuild
Advanced tooling with refactoring++ across js,ts, and imba files
Hope you like it, and please share any feedback you might have in the comments!
3
u/Ran4 Aug 16 '21
Looks really cool! But how do you define custom types?
3
u/sindreaars Aug 16 '21
If you want to define interfaces / plan types you currently need to create them in `.d.ts` files. Type-only definitions may be introduced in 2.1 or a later version :)
3
u/Ran4 Aug 16 '21
Since a large fraction of all code tends to be types, shouldn't that be a primary concern as it is intimately related to the syntax?
2
u/sindreaars Aug 16 '21
Well, the fraction clearly depends on which language you are using. JS is a very popular language where 0% of the code is types :P Imba started out just like that, but for v2 we added support for type annotations to improve intellisense and IDE behaviour. For our internal use - when we want to declare some strict types that are not naturally inferred by the tooling - using `.d.ts` files works well enough.
16
Aug 16 '21 edited Aug 16 '21
It seems an interesting idea, and quite a mature product, but I think I'm somewhat skeptical of the premise.
Imba's time-saving syntax with built-in tags and styles results in less typing and switching files
A huge amount of time devs spend developing is not spent typing. I'm personally way more interested in code which is expressive, easy to read and easy to debug. Having a language which uses the fewest keystrokes in not a concern of mine. Making everything as concise as possible increases the burden on me to remember all the shorthands.
Is there debugger support for this? It seems like it is quite a significant abstraction over the generated javascript that I really can't see how a debugger would work effectively.
I see plenty of places where the website says "it's fast" relative to other frameworks but I don't see any concrete benchmarks or other proof of this. Do any exist?
You say you're YC-backed but how do you plan to monetize this?
Overall, seems like very strong progress. Good job!
9
u/balefrost Aug 16 '21
You say you're YC-backed but how do you plan to monetize this?
From OP's original post, it sounds like their actual business does something else; this is just the infrastructure that they've built to drive their actual projects.
17
u/balefrost Aug 16 '21
On one hand, given that this is /r/AskProgramming, I'm generally not a fan of people who post without actually asking a question. (In my mind, "feedback welcome" isn't an actual question.)
On the other hand, this is certainly an interesting project and you've clearly put a lot of time into it. As a "show and tell", it's really cool. It's fun to see a take on how to do web apps better, and this take is more than just a laboratory experiment. That's interesting.
And surprisingly, you didn't repost to all the programming-related subreddits - just /r/webdev, /r/javascript, and... /r/AskProgramming.
So now I gotta ask - why this subreddit?
2
u/Zardotab Aug 16 '21
If this is the incorrect sub-reddit, then what is the correct one? If there is no better match, then it's acceptable in my opinion to put in the closest match even if it's not an optimum title/category.
If Reddit hired a centralized Category Management Lord, then maybe it would be smoother. But Reddit leaves it semi-organic, meaning categories and rules have (at least) temporary rough spots.
3
u/knoam Aug 17 '21
r/ProgrammingLanguages is for people like OP working on developing their own PLs and talking shop.
3
u/Zardotab Aug 17 '21 edited Aug 17 '21
r/ProgrammingLanguages happens to be populated by those who enjoy "high brow" connoisseur programming and programming features that may not fly well in the real world, where staffing is unpredictable and teamwork matters heavily. It's hard to get practical "work day" feedback there.
0
u/balefrost Aug 17 '21
Let me be clear: I'm not trying to chase you away.
I think this subreddit works best when the discussion is around a specific question. The question might have a clear, unambiguous answer or it might be an open-ended and philosophical question - both are fine. I think it also helps when the question is more-or-less self-contained. I don't know how other people interact with this sub, but I tend to check periodically for questions that aren't getting any love or questions where I have very specific knowledge that can help.
To me, your "question" is just really really big. As you said, you've spent 7 years on this thing. Any insightful critique would similarly require a big time investment in order to make the critique meaningful.
I think it's interesting that several top-level comments are asking YOU about your language. I guess that's still a question, just very role-reversed for this sub.
Is there some aspect of your language where you want specific feedback? Is there something that's particularly novel? I think, if you could provide a more specific prompt, you might get more engaged discussion.
Again, I'm not trying to be a gatekeeper here. You're clearly interested in discussion, unlike some of the people who spam to 50 different subs (including this one) and then bounce. AskProgramming just seemed like a surprising choice to me.
Here are some other places that might be relevant:
/r/ProgrammingLanguages (there are plenty of language nerds that hang out there) /r/typescript (since it sounds like you have close interop) /r/programming ('cause why not shoot for the moon)
1
u/Zardotab Aug 17 '21 edited Aug 17 '21
Well I agree it's probably too much to chew for Reddit discussions. Maybe r/sindreaars can introduce the language and pick one allegedly wonderful feature every few months to highlight and discuss.
For example, I love optional named parameters and wonder why more languages don't have them. (C# and VB.Net are the most common examples.) Currently recommended "emulations" of them are half-ass, more code, and more rework per function signature change. If Imba doesn't have them, I have to summarily write it off. They are that important to me.
6
u/yel50 Aug 16 '21
I was hoping that by alternative you meant a browser extension that could use a different language and completely replace js, but no. yet another transpiler added to the mile long list. to be honest, it looks like coffeescript to me. except that coffeescript added language features and I don't notice any here.
6
u/marinac_1 Aug 16 '21
Soooo this is not a "JavaScript alternative" it's just a compiler?
PS: Had 7 years to create new language => didn't remove null smh
5
2
2
Aug 16 '21
Do I have to use the abbreviated terms in CSS? What if I prefer the full naming convention for sake of readability?
2
1
1
0
u/Zardotab Aug 16 '21
You perhaps should have asked for feedback before you started, collected suggestions, listed alternatives in a pro/con format, and then have some kind of systematic and traceable ranking system to vote on features.
24
u/AlminCode Aug 16 '21
Why would I use Imba instead of TS?