Live data from Hacker News

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

news.ycombinator.com

11–20 of 354 posts

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

#11
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 :)

Why do you think this?

"const" seems clearer to me. "con" seems very open to misinterpretation: could mean many things.

Are there any advantages to "con" over "const"?

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

#12
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 :)

Is the difference in length bothering you? In that case I find that let for immutable and var for mutable is pretty good, although for a language that's lose to JS that might not be a good idea. Maybe let for mutable like in JS, and val for immutable? (inspired by Scala).

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

#13
You call it "full-stack" and mention memoized DOM, which makes it sound like it's not only a language but also a framework.

Is there a clear separation between those two parts? Could someone take just the language without the framework and use it for something that's not web related?

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

#14

You call it "full-stack" and mention memoized DOM, which makes it sound like it's not only a language but also a framework. Is there a clear separation between those two parts? Could someone take just the language without the framework and use it for something that's not web related?

You can definitely use 'just the language' part. I'm using it daily for scripting, and we've written a lot of apis and libraries at Scrimba that does not utilize any of the framework-ish features of the language. But to make the tags and styling work really well it (imho) has to be thought of at the language-level.

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

#16
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 :)

Why does const irk you? const sounds a lot clearer than con. Is that your primary criteria for picking a language? ;)

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 start with "con" and "let". It would make the code visually more appealing to me.

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

#17
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 :)

Personally I don’t use any languages with reserved words

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

#18
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 :)

Why do you think this? "const" seems clearer to me. "con" seems very open to misinterpretation: could mean many things. Are there any advantages to "con" over "const"?

My guess is the OP dislikes the difference in keyword length.

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

#19
post #16

Earlier quoted context omitted.

Why does const irk you? const sounds a lot clearer than con. Is that your primary criteria for picking a language? ;)

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.

Post reply on HN