Earlier quoted context omitted.
I learned React to know what it was about and what people were talking about. I think a lot of people get the wrong idea about React. They say the virtual DOM is the most important feature, but I think it's actually the fact that it forces you to componentize your code. And it does this by making non-componentized code very painful to work with, so you have to componentize to be able to have any shot at getting React…
"I know almost nothing about the subject at hand, so here's my expert opinion on it"
Show HN: Imba – I have spent 7 years creating a programming language for the web
261–270 of 354 posts
Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#262Earlier quoted context omitted.
I don't see a difference between switching between files and switching between positions in a file which is longer than a page or two. In both cases the switching is not free - unless you do something about it (like spliting panes/windows in your editor; bonus: it works for both separate files and long files in the same way!). It's also trivial (well... depending on the IDE/editor I guess) to make it open all 3 files…
> I don't see a difference between switching between files and switching between positions in a file which is longer than a page or two. Exactly! By putting everything into one file, you give the reader the option of splitting their view if they want, or looking at the file all in one pane; with multiple files, you have to have each file open independently. Editors give pretty nice ways of navigating to specific func…
The differences between my and your environments mean that our preferred workflows differ, too, because what can be problematic for you can be easy for me, and vice versa.
That being said, I also don't advocate "splitting everything into super small files". Splitting a file that is less than a "page or two" (I see 61 lines of code on one page, so less than 120 loc) is a mistake and should be done only in special circumstances, while files that grew larger than 500 loc should be refactored if it makes sense. Files over 1k loc have to be split. That's the policy we use at work, and I think it results in a pretty nice and easy to navigate code bases.
Back to the editors, though: as long as the codebase uses a convention - any convention - consistently, you can make it nice to work with, by altering your environment to match the convention. This is where the more configurable and easier to script editors win big time - if there's something in the codebase you don't like, and can't change, you can script it out of sight and out of mind easily. Coming from such an editor, I personally don't have a strong opinion on how the codebase should be structured (which includes the lenghts of files) - I do have some preferences, but I'm not very attached to them. That's just to signal that I'm not the one of people "fascinated" with splitting files for the sake of it :)
Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#263Looks cool. I'm honestly curious as to why a lot of new web languages/frameworks are mixing logic and content in the same file again though. The distinction between HTML, JS and CSS always made perfect sense to me. Anyone care to enlighten me?
Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#264Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#265Earlier quoted context omitted.
I don’t see any added value of separating pieces of a component into different files. The CSS, JS, and HTML are all logically coupled no matter how you organize them. At best you will achieved a few smaller files. At worst you make working within the system a real pain.
I don't see a difference between switching between files and switching between positions in a file which is longer than a page or two. In both cases the switching is not free - unless you do something about it (like spliting panes/windows in your editor; bonus: it works for both separate files and long files in the same way!). It's also trivial (well... depending on the IDE/editor I guess) to make it open all 3 files…
Actual workflows diverge significantly from the above. It's a matter of cohesion. Yes, co-locating each of the files (and only these files) in a single "component" directory can help ease navigation and discovery, but most of the time it's just easier to keep everything as cohesive as possible.
Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#266Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#267I just want to compliment the OP on a very clear and comprehensive website at https://imba.io/ . It clearly explains (by showing and telling) what Imba is, why I should care, how it works and how to get started. The floating demo applications even work well on mobile. Rare to see this level of polish for these things.
One piece of feedback: it took me a moment to work out what 'pt', 'o' and 'fs' were. Single character variables are fine for algorithms but for demos you really want to use actual words.
Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#268I’m sick of programming languages that use “fast typing” and “productiveness” as a selling point. There’s no selling point in being productive doing a counter in a few seconds, production scenarios are far more complex and very often all those new programming languages fall short to their promise. Btw I don’t want to be fast or productive, I want to write code that works decently and is great for other humans myself…
I don't see the value in being able to "type fast". I see it in less visual clutter.
Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#269I'm impressed!
Re: Show HN: Imba – I have spent 7 years creating a programming language for the web
#270This read like gibberish to me name Why are we moving away from elegant legible HTML/JS/CSS stack to no nightmares like this and React where everything is smooshed together? > bringing the elegance and concision of Ruby into the browser As a big fan of Ruby how does this tap into the elegance of Ruby? Ruby is readable, this is not. In Ruby it's very difficult to write code that makes people suffer greatly to understa…
What a truthfully useless statement. "Good" means having opinions about things that dont matter? Like "I don't like that css uses full words, I prefer these acronyms"
Who gives a shit? Is this language designed to prevent copy pasting? You may be on to something here.