Live data from Hacker News

Show HN: Imba – I have spent 7 years creating a programming language for the web

news.ycombinator.com

21–30 of 354 posts

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#21
post #16

Earlier quoted context omitted.

I think it has three reasons: The more often a construct is used in a language, the shorter I like it to be. It groups variable definitions mentally by having them all the same length if they are "var", "let" and "con". It would often make the code look more uniform which is more beautiful in my eyes. Example: https://github.com/facebook/react/blob/cae635054e17a6f107a39... I would prefer the lines 226 and 227 to star…

As far as code being visually appealing, for me those two lines are the least of that code’s troubles. I’m sympathetic to wanting code to have good aesthetics. If I was writing those lines I probably would have daydreamed for 5 minutes thinking of new names for map and record so that the equal signs would line up.

[deleted]

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#22
That's a very tight integration with JS&TS! Are you compiling into TS and then to JS? Or is it more of a decoupled process that was set up for the type-checking (like how tsconfig and babel works together)? When I was trying out ReasonML a few years back (and being unfamiliar with OCaml) I ran into some problems with bridging across types.

I checked out https://github.com/imba/typescript-imba-plugin for a bit and I'm still quite lost. Love to learn more!

Also, what is the cross-file refactorings in the tooling? Thanks!

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#23
This looks very cool, thanks for sharing!

I took a cursory look at the docs and it looks like async/await is pretty much directly analogous to how it works in JS, with the difference that you don't need to mark functions as async in order to use the await keyword. Does this mean that if you use await in any function then any other function calling it will have to be refactored to add an await keyword, just like you have to refactor any call sites in JS if you make a function async?

I remember seeing someone here on HN showcasing a language where they did the opposite, making it so that await is implicit, so calling fetch or anything async doesn't require an additional keyword, and functions don't need to be refactored just to sprinkle async/await everywhere. I'll see if I can find that language again, but it seems to me there may be some idea sharing between the two that could perhaps yield some amazing features...

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#24
Wow you are clearly a genius. The syntax looks beautiful! This is great. I don't want to use it (the best tool for the job for me is one that fits my own mental models, my own mind, and this is not it) but you are a genius.

Also -- wow those Nordics are super productive programmers/coders/developers/open-sorcerers (Sindre Aarsaether & Sindre Sorhus & Linus Torvalds & ......) -- could it maybe have something to do with: The low GNI, the high HDI and the great weather for coding? (cold, blistery, bleak, focused, electrons-and-light universe is only outlet in a desolate landscape)? I have been to Oslo. The architecture is great.

PS - I use my own memoized DOM with minimal/granular updates in my own quirky framework (https://github.com/i5ik/vanillaview)

PPS - BTW memoized DOM is a great term of art. I perhaps shall be using it from now.

CONGRATULATIONS, SIR!

PPPS - Also what you are doing with Scrimba is so incredible. And GOOD. You are such a fuqing genius. Wow!

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#25
post #5

One thing that irks me about Javascript is "const". I think it should have been called "con". "var", "let", "con". So the first thing I did here is look up the docs and see how variables are declared. Aaarghh.. "let" and "const" again :)

I've never used a language with a 'cons' keyword, but nevertheless that's what I'd assume your 'con' was, if you didn't tell me otherwise.

I'm no particular JS fan, but 'const' is much clearer, it's a complete syllable, just like 'var' or 'func'. Yes 'fun' is used, but I think that's awkward for the same reason.

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#26
post #23

This looks very cool, thanks for sharing! I took a cursory look at the docs and it looks like async/await is pretty much directly analogous to how it works in JS, with the difference that you don't need to mark functions as async in order to use the await keyword. Does this mean that if you use await in any function then any other function calling it will have to be refactored to add an await keyword, just like you h…

That pretty much describes Lua.

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#27
is there any particular reason why there doesn’t seem to be built-in type-checking system? i know it still seems to be a “personal preference” whether to check one’s types, but i wonder if any thought was given to including it?

Re: Show HN: Imba – I have spent 7 years creating a programming language for the web

#30
post #29

Would it be possible with this to just apply tailwind css classes instead of learning this built in style syntax?

Sure, you can apply tailwind classes like `` etc, but I'd definitely recommend using the built in styling as it is much more powerful (value interpolation, flexible modifiers etc).
Post reply on HN